From bae8b283c76772c3154dfd8aa6c4581c88b5c723 Mon Sep 17 00:00:00 2001 From: Vladimir Sukharev Date: Tue, 19 Sep 2023 21:29:17 +0200 Subject: [PATCH] [IR] Normalize temp var names in Kotlin-like dump ^KT-61983 Fixed --- .../kotlin/ir/util/RenderIrElement.kt | 4 +- .../kotlin/ir/util/dumpKotlinLike.kt | 24 ++- .../dataClassWithArrayMembers.kt.txt | 28 +-- .../classes/dataClasses/dataClasses.kt.txt | 22 +- .../dataClasses/dataClassesGeneric.kt.txt | 16 +- .../classes/dataClasses/dataObject.kt.txt | 2 +- .../dataClasses/delegationInSealed.fir.kt.txt | 4 +- .../dataClasses/delegationInSealed.kt.txt | 4 +- .../irText/classes/dataClasses/kt31649.kt.txt | 8 +- ...mbdaInDataClassDefaultParameter.fir.kt.txt | 8 +- .../lambdaInDataClassDefaultParameter.kt.txt | 8 +- .../classes/dataClasses/openDataClass.kt.txt | 6 +- .../ir/irText/classes/enum.fir.kt.txt | 6 +- .../testData/ir/irText/classes/enum.kt.txt | 6 +- .../ir/irText/classes/inlineClass.kt.txt | 4 +- .../inlineClassSyntheticMethods.kt.txt | 4 +- .../arrayAccessCompositeOperators.fir.kt.txt | 10 +- .../arrayAccessCompositeOperators.kt.txt | 14 +- .../arrayAccessOperators.fir.kt.txt | 10 +- .../arrayAccessOperators.kt.txt | 10 +- .../compoundAssignmentOperators.fir.kt.txt | 4 +- .../compoundAssignmentOperators.kt.txt | 20 +- .../fromKEEP/compareTo.fir.kt.txt | 6 +- .../fromKEEP/compareTo.kt.txt | 6 +- .../iteratorOperator.fir.kt.txt | 22 +- .../contextReceivers/iteratorOperator.kt.txt | 22 +- .../unaryOperators.fir.kt.txt | 22 +- .../contextReceivers/unaryOperators.kt.txt | 22 +- .../inlineCollectionOfInlineClass.fir.kt.txt | 8 +- .../inlineCollectionOfInlineClass.kt.txt | 8 +- .../dataClassWithJvmRecord.fir.kt.txt | 4 +- .../jvmRecord/dataClassWithJvmRecord.kt.txt | 4 +- .../ir/irText/declarations/kt47527.fir.kt.txt | 24 +-- .../ir/irText/declarations/kt47527.kt.txt | 24 +-- .../ir/irText/declarations/kt52677.fir.kt.txt | 4 +- .../ir/irText/declarations/kt52677.kt.txt | 4 +- .../localDelegatedProperties.fir.kt.txt | 6 +- .../localDelegatedProperties.kt.txt | 6 +- .../parameters/dataClassMembers.kt.txt | 6 +- .../arrayAugmentedAssignment1.fir.kt.txt | 22 +- .../arrayAugmentedAssignment1.kt.txt | 22 +- .../arrayAugmentedAssignment2.fir.kt.txt | 6 +- .../arrayAugmentedAssignment2.kt.txt | 6 +- .../badInlinedBreakContinue.kt.txt | 6 +- .../ir/irText/expressions/bangbang.fir.kt.txt | 6 +- .../ir/irText/expressions/bangbang.kt.txt | 6 +- .../breakContinueInLoopHeader.fir.kt.txt | 36 ++-- .../breakContinueInLoopHeader.kt.txt | 36 ++-- .../breakContinueInWhen.fir.kt.txt | 12 +- .../expressions/breakContinueInWhen.kt.txt | 12 +- .../callWithReorderedArguments.kt.txt | 10 +- .../caoWithAdaptationForSam.fir.kt.txt | 36 ++-- .../caoWithAdaptationForSam.kt.txt | 36 ++-- .../withVarargViewedAsArray.fir.kt.txt | 6 +- .../withVarargViewedAsArray.kt.txt | 6 +- .../expressions/chainOfSafeCalls.kt.txt | 24 +-- .../expressions/coercionToUnit.fir.kt.txt | 12 +- .../irText/expressions/coercionToUnit.kt.txt | 12 +- .../complexAugmentedAssignment.fir.kt.txt | 34 ++-- .../complexAugmentedAssignment.kt.txt | 44 ++-- .../expressions/destructuring1.fir.kt.txt | 6 +- .../irText/expressions/destructuring1.kt.txt | 6 +- .../destructuringWithUnderscore.fir.kt.txt | 6 +- .../destructuringWithUnderscore.kt.txt | 6 +- .../ir/irText/expressions/dotQualified.kt.txt | 6 +- .../ir/irText/expressions/elvis.fir.ir.txt | 111 ----------- .../ir/irText/expressions/elvis.fir.kt.txt | 63 ------ .../testData/ir/irText/expressions/elvis.kt | 1 + .../ir/irText/expressions/elvis.kt.txt | 30 +-- .../exhaustiveWhenElseBranch.fir.kt.txt | 36 ++-- .../exhaustiveWhenElseBranch.kt.txt | 36 ++-- .../expressions/extFunSafeInvoke.kt.txt | 6 +- .../nullableFloatingPointEqeq.fir.kt.txt | 18 +- .../nullableFloatingPointEqeq.kt.txt | 18 +- .../whenByFloatingPoint.fir.kt.txt | 26 +-- .../whenByFloatingPoint.kt.txt | 26 +-- .../ir/irText/expressions/for.fir.ir.txt | 72 ------- .../ir/irText/expressions/for.fir.kt.txt | 45 ----- .../testData/ir/irText/expressions/for.kt | 1 + .../testData/ir/irText/expressions/for.kt.txt | 28 +-- .../forWithBreakContinue.fir.kt.txt | 36 ++-- .../expressions/forWithBreakContinue.kt.txt | 36 ++-- .../forWithImplicitReceivers.fir.kt.txt | 12 +- .../forWithImplicitReceivers.kt.txt | 14 +- ...otNullInDestructuringAssignment.fir.kt.txt | 6 +- ...citNotNullInDestructuringAssignment.kt.txt | 6 +- .../expressions/incrementDecrement.fir.kt.txt | 172 ++++++++-------- .../expressions/incrementDecrement.kt.txt | 188 +++++++++--------- ...aSyntheticGenericPropretyAccess.fir.kt.txt | 12 +- .../javaSyntheticGenericPropretyAccess.kt.txt | 12 +- .../javaSyntheticPropertyAccess.fir.kt.txt | 12 +- .../javaSyntheticPropertyAccess.kt.txt | 12 +- .../ir/irText/expressions/kt16904.kt.txt | 8 +- .../ir/irText/expressions/kt28456.fir.kt.txt | 20 +- .../ir/irText/expressions/kt28456.kt.txt | 20 +- .../ir/irText/expressions/kt28456b.fir.kt.txt | 16 +- .../ir/irText/expressions/kt28456b.kt.txt | 16 +- .../ir/irText/expressions/kt30020.fir.kt.txt | 12 +- .../ir/irText/expressions/kt30020.kt.txt | 16 +- .../ir/irText/expressions/kt30796.fir.kt.txt | 72 +++---- .../ir/irText/expressions/kt30796.kt.txt | 72 +++---- .../ir/irText/expressions/kt36956.fir.kt.txt | 10 +- .../ir/irText/expressions/kt36956.kt.txt | 10 +- .../irText/expressions/lambdaInCAO.fir.kt.txt | 16 +- .../ir/irText/expressions/lambdaInCAO.kt.txt | 16 +- .../expressions/multipleSmartCasts.fir.kt.txt | 6 +- .../expressions/multipleSmartCasts.kt.txt | 6 +- .../expressions/safeAssignment.fir.kt.txt | 6 +- .../irText/expressions/safeAssignment.kt.txt | 6 +- .../safeCallWithIncrementDecrement.fir.kt.txt | 32 +-- .../safeCallWithIncrementDecrement.kt.txt | 34 ++-- .../irText/expressions/safeCalls.fir.kt.txt | 36 ++-- .../ir/irText/expressions/safeCalls.kt.txt | 36 ++-- .../smartCastsWithDestructuring.fir.kt.txt | 6 +- .../smartCastsWithDestructuring.kt.txt | 6 +- ...temporaryInEnumEntryInitializer.fir.kt.txt | 6 +- .../temporaryInEnumEntryInitializer.kt.txt | 6 +- .../expressions/temporaryInInitBlock.kt.txt | 6 +- .../variableAsFunctionCall.fir.kt.txt | 12 +- .../expressions/variableAsFunctionCall.kt.txt | 12 +- .../ir/irText/expressions/when.fir.kt.txt | 32 +-- .../ir/irText/expressions/when.kt.txt | 32 +-- .../expressions/whenCoercedToUnit.kt.txt | 4 +- .../irText/expressions/whenReturn.fir.kt.txt | 10 +- .../ir/irText/expressions/whenReturn.kt.txt | 10 +- .../irText/expressions/whenReturnUnit.kt.txt | 6 +- .../whenSmartCastToEnum.fir.kt.txt | 16 +- .../expressions/whenSmartCastToEnum.kt.txt | 16 +- .../whenUnusedExpression.fir.kt.txt | 4 +- .../expressions/whenUnusedExpression.kt.txt | 4 +- .../expressions/whileDoWhile.fir.kt.txt | 24 +-- .../ir/irText/expressions/whileDoWhile.kt.txt | 24 +-- .../ir/irText/firProblems/ArrayMap.fir.kt.txt | 24 +-- .../ir/irText/firProblems/ArrayMap.kt.txt | 30 +-- .../firProblems/AssignmentOperator.fir.kt.txt | 162 +++++++-------- .../firProblems/AssignmentOperator.kt.txt | 178 ++++++++--------- .../ClashResolutionDescriptor.fir.kt.txt | 12 +- .../ClashResolutionDescriptor.kt.txt | 12 +- .../firProblems/DeepCopyIrTree.fir.kt.txt | 10 +- .../irText/firProblems/DeepCopyIrTree.kt.txt | 10 +- .../ImplicitReceiverStack.fir.kt.txt | 6 +- .../firProblems/ImplicitReceiverStack.kt.txt | 6 +- .../irText/firProblems/MultiList.fir.kt.txt | 4 +- .../ir/irText/firProblems/MultiList.kt.txt | 4 +- .../firProblems/SafeLetWithReturn.fir.ir.txt | 105 ---------- .../firProblems/SafeLetWithReturn.fir.kt.txt | 51 ----- .../irText/firProblems/SafeLetWithReturn.kt | 1 + .../firProblems/SafeLetWithReturn.kt.txt | 24 +-- .../firProblems/SignatureClash.fir.kt.txt | 4 +- .../irText/firProblems/SignatureClash.kt.txt | 4 +- .../coercionToUnitForNestedWhen.fir.kt.txt | 12 +- .../coercionToUnitForNestedWhen.kt.txt | 12 +- .../elvisOnBackingFieldInGetter.fir.kt.txt | 6 +- .../elvisOnBackingFieldInGetter.kt.txt | 6 +- .../ir/irText/firProblems/emptyWhen.kt.txt | 4 +- .../ir/irText/firProblems/kt55458.fir.kt.txt | 4 +- .../ir/irText/firProblems/kt55458.kt.txt | 4 +- .../firProblems/valueClassEquals.fir.kt.txt | 4 +- .../firProblems/valueClassEquals.kt.txt | 4 +- .../ir/irText/js/dynamic/dynamicCall.kt.txt | 6 +- .../dynamic/dynamicElvisOperator.fir.ir.txt | 17 -- .../dynamic/dynamicElvisOperator.fir.kt.txt | 10 - .../irText/js/dynamic/dynamicElvisOperator.kt | 1 + .../js/dynamic/dynamicElvisOperator.kt.txt | 6 +- .../js/dynamic/dynamicMemberAccess.kt.txt | 6 +- .../dynamicMemberAssignment.fir.kt.txt | 6 +- .../js/dynamic/dynamicMemberAssignment.kt.txt | 6 +- ...ynamicMemberAugmentedAssignment.fir.kt.txt | 30 +-- .../dynamicMemberAugmentedAssignment.kt.txt | 30 +-- .../dynamicMemberIncrementDecrement.kt.txt | 24 +-- .../lambdas/destructuringInLambda.fir.kt.txt | 6 +- .../lambdas/destructuringInLambda.kt.txt | 6 +- .../irText/lambdas/localFunction.fir.kt.txt | 6 +- .../ir/irText/lambdas/localFunction.kt.txt | 6 +- .../regressions/coercionInLoop.fir.kt.txt | 6 +- .../irText/regressions/coercionInLoop.kt.txt | 6 +- .../ir/irText/regressions/kt24114.fir.ir.txt | 64 ------ .../ir/irText/regressions/kt24114.fir.kt.txt | 44 ---- .../testData/ir/irText/regressions/kt24114.kt | 1 + .../ir/irText/regressions/kt24114.kt.txt | 16 +- .../castsInsideCoroutineInference.fir.kt.txt | 12 +- .../castsInsideCoroutineInference.kt.txt | 12 +- .../irText/types/definitelyNonNull.fir.ir.txt | 45 ----- .../irText/types/definitelyNonNull.fir.kt.txt | 17 -- .../ir/irText/types/definitelyNonNull.kt | 1 + .../ir/irText/types/definitelyNonNull.kt.txt | 6 +- ...bilityInDestructuringAssignment.fir.kt.txt | 24 +-- ...ullabilityInDestructuringAssignment.kt.txt | 24 +-- .../enhancedNullabilityInForLoop.fir.kt.txt | 40 ++-- .../enhancedNullabilityInForLoop.kt.txt | 40 ++-- .../nullChecks/nullCheckInElvisRhs.fir.ir.txt | 23 --- .../nullChecks/nullCheckInElvisRhs.fir.kt.txt | 17 -- .../types/nullChecks/nullCheckInElvisRhs.kt | 1 + .../nullChecks/nullCheckInElvisRhs.kt.txt | 6 +- ...meterWithMultipleNullableBounds.fir.kt.txt | 6 +- ...ParameterWithMultipleNullableBounds.kt.txt | 6 +- .../typeAliasWithUnsafeVariance.fir.kt.txt | 4 +- .../types/typeAliasWithUnsafeVariance.kt.txt | 4 +- .../handlers/IrPrettyKotlinDumpHandler.kt | 1 + 199 files changed, 1599 insertions(+), 2273 deletions(-) delete mode 100644 compiler/testData/ir/irText/expressions/elvis.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/expressions/elvis.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/expressions/for.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/expressions/for.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/regressions/kt24114.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/regressions/kt24114.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/types/definitelyNonNull.fir.kt.txt delete mode 100644 compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt delete mode 100644 compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.kt.txt diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index 635bb78ecd0..a81202ce977 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -750,12 +750,12 @@ private val IrFunction.safeReturnType: IrType? private fun IrLocalDelegatedProperty.renderLocalDelegatedPropertyFlags() = if (isVar) "var" else "val" -private class VariableNameData(val normalizeNames: Boolean) { +internal class VariableNameData(val normalizeNames: Boolean) { val nameMap: MutableMap = mutableMapOf() var temporaryIndex: Int = 0 } -private fun IrVariable.normalizedName(data: VariableNameData): String { +internal fun IrVariable.normalizedName(data: VariableNameData): String { if (data.normalizeNames && (origin == IrDeclarationOrigin.IR_TEMPORARY_VARIABLE || origin == IrDeclarationOrigin.FOR_LOOP_ITERATOR)) { return data.nameMap.getOrPut(symbol) { "tmp_${data.temporaryIndex++}" } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/dumpKotlinLike.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/dumpKotlinLike.kt index 606780aed09..a4b0b4dda3c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/dumpKotlinLike.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/dumpKotlinLike.kt @@ -14,14 +14,10 @@ import org.jetbrains.kotlin.ir.IrElement import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.expressions.* -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol +import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.util.CustomKotlinLikeDumpStrategy.Modifiers import org.jetbrains.kotlin.ir.visitors.IrElementVisitor -import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.utils.Printer @@ -70,6 +66,7 @@ data class KotlinLikeDumpOptions( val printElseAsTrue: Boolean = false, val printUnitReturnType: Boolean = false, val stableOrder: Boolean = false, + val normalizeNames: Boolean = false, /* TODO add more options: always print visibility? @@ -167,16 +164,21 @@ interface CustomKotlinLikeDumpStrategy { * option? * unique ids for symbols, or SignatureID? * option? - * "normalize" names for tmps? ^^ Could unique ids help? * wrap/escape invalid identifiers with "`", like "$$delegate" */ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOptions) : IrElementVisitor { + private val variableNameData = VariableNameData(options.normalizeNames) + private val IrSymbol.safeName get() = if (!isBound) { "/* ERROR: unbound symbol $signature */" } else { - (owner as? IrDeclarationWithName)?.name?.toString() ?: "/* ERROR: unnamed symbol $signature */" + when (val owner = owner) { + is IrVariable -> owner.normalizedName(variableNameData) + is IrDeclarationWithName -> owner.name.toString() + else -> "/* ERROR: unnamed symbol $signature */" + } } private val IrFunctionSymbol.safeValueParameters @@ -923,7 +925,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption p(declaration.isLateinit, "lateinit") p(declaration.isConst, "const") - declaration.run { printVariable(isVar, name, type) } + declaration.run { printVariable(isVar, normalizedName(variableNameData), type) } declaration.initializer?.let { p.printWithNoIndent(" = ") @@ -936,7 +938,7 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption p.printIndent() // TODO think about better rendering - declaration.run { printVariable(isVar, name, type) } + declaration.run { printVariable(isVar, name.asString(), type) } p.printlnWithNoIndent() p.pushIndent() @@ -951,10 +953,10 @@ private class KotlinLikeDumper(val p: Printer, val options: KotlinLikeDumpOption p.printlnWithNoIndent() } - private fun printVariable(isVar: Boolean, name: Name, type: IrType) { + private fun printVariable(isVar: Boolean, name: String, type: IrType) { p.printWithNoIndent(if (isVar) "var" else "val") p.printWithNoIndent(" ") - p.printWithNoIndent(name.asString()) + p.printWithNoIndent(name) p.printWithNoIndent(": ") type.printTypeWithNoIndent() } diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt.txt index c5faa614d46..edaa86ec783 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClassWithArrayMembers.kt.txt @@ -105,33 +105,33 @@ data class Test1 { when { other !is Test1 -> return false } - val tmp0_other_with_cast: Test1 = other as Test1 + val tmp_0: Test1 = other as Test1 when { - EQEQ(arg0 = .#stringArray, arg1 = tmp0_other_with_cast.#stringArray).not() -> return false + EQEQ(arg0 = .#stringArray, arg1 = tmp_0.#stringArray).not() -> return false } when { - EQEQ(arg0 = .#charArray, arg1 = tmp0_other_with_cast.#charArray).not() -> return false + EQEQ(arg0 = .#charArray, arg1 = tmp_0.#charArray).not() -> return false } when { - EQEQ(arg0 = .#booleanArray, arg1 = tmp0_other_with_cast.#booleanArray).not() -> return false + EQEQ(arg0 = .#booleanArray, arg1 = tmp_0.#booleanArray).not() -> return false } when { - EQEQ(arg0 = .#byteArray, arg1 = tmp0_other_with_cast.#byteArray).not() -> return false + EQEQ(arg0 = .#byteArray, arg1 = tmp_0.#byteArray).not() -> return false } when { - EQEQ(arg0 = .#shortArray, arg1 = tmp0_other_with_cast.#shortArray).not() -> return false + EQEQ(arg0 = .#shortArray, arg1 = tmp_0.#shortArray).not() -> return false } when { - EQEQ(arg0 = .#intArray, arg1 = tmp0_other_with_cast.#intArray).not() -> return false + EQEQ(arg0 = .#intArray, arg1 = tmp_0.#intArray).not() -> return false } when { - EQEQ(arg0 = .#longArray, arg1 = tmp0_other_with_cast.#longArray).not() -> return false + EQEQ(arg0 = .#longArray, arg1 = tmp_0.#longArray).not() -> return false } when { - EQEQ(arg0 = .#floatArray, arg1 = tmp0_other_with_cast.#floatArray).not() -> return false + EQEQ(arg0 = .#floatArray, arg1 = tmp_0.#floatArray).not() -> return false } when { - EQEQ(arg0 = .#doubleArray, arg1 = tmp0_other_with_cast.#doubleArray).not() -> return false + EQEQ(arg0 = .#doubleArray, arg1 = tmp_0.#doubleArray).not() -> return false } return true } @@ -172,9 +172,9 @@ data class Test2 { when { other !is Test2 -> return false } - val tmp0_other_with_cast: Test2 = other as Test2 + val tmp_1: Test2 = other as Test2 when { - EQEQ(arg0 = .#genericArray, arg1 = tmp0_other_with_cast.#genericArray).not() -> return false + EQEQ(arg0 = .#genericArray, arg1 = tmp_1.#genericArray).not() -> return false } return true } @@ -218,9 +218,9 @@ data class Test3 { when { other !is Test3 -> return false } - val tmp0_other_with_cast: Test3 = other as Test3 + val tmp_2: Test3 = other as Test3 when { - EQEQ(arg0 = .#anyArrayN, arg1 = tmp0_other_with_cast.#anyArrayN).not() -> return false + EQEQ(arg0 = .#anyArrayN, arg1 = tmp_2.#anyArrayN).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt.txt index 3a72fd1a9a8..aa5451183d9 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClasses.kt.txt @@ -51,15 +51,15 @@ data class Test1 { when { other !is Test1 -> return false } - val tmp0_other_with_cast: Test1 = other as Test1 + val tmp_0: Test1 = other as Test1 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_0.#y).not() -> return false } when { - EQEQ(arg0 = .#z, arg1 = tmp0_other_with_cast.#z).not() -> return false + EQEQ(arg0 = .#z, arg1 = tmp_0.#z).not() -> return false } return true } @@ -103,9 +103,9 @@ data class Test2 { when { other !is Test2 -> return false } - val tmp0_other_with_cast: Test2 = other as Test2 + val tmp_1: Test2 = other as Test2 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_1.#x).not() -> return false } return true } @@ -180,18 +180,18 @@ data class Test3 { when { other !is Test3 -> return false } - val tmp0_other_with_cast: Test3 = other as Test3 + val tmp_2: Test3 = other as Test3 when { - EQEQ(arg0 = .#d, arg1 = tmp0_other_with_cast.#d).not() -> return false + EQEQ(arg0 = .#d, arg1 = tmp_2.#d).not() -> return false } when { - EQEQ(arg0 = .#dn, arg1 = tmp0_other_with_cast.#dn).not() -> return false + EQEQ(arg0 = .#dn, arg1 = tmp_2.#dn).not() -> return false } when { - EQEQ(arg0 = .#f, arg1 = tmp0_other_with_cast.#f).not() -> return false + EQEQ(arg0 = .#f, arg1 = tmp_2.#f).not() -> return false } when { - EQEQ(arg0 = .#df, arg1 = tmp0_other_with_cast.#df).not() -> return false + EQEQ(arg0 = .#df, arg1 = tmp_2.#df).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt.txt index 4ee9f836e40..f4f399be185 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataClassesGeneric.kt.txt @@ -35,9 +35,9 @@ data class Test1 { when { other !is Test1 -> return false } - val tmp0_other_with_cast: Test1 = other as Test1 + val tmp_0: Test1 = other as Test1 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } return true } @@ -78,9 +78,9 @@ data class Test2 { when { other !is Test2 -> return false } - val tmp0_other_with_cast: Test2 = other as Test2 + val tmp_1: Test2 = other as Test2 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_1.#x).not() -> return false } return true } @@ -121,9 +121,9 @@ data class Test3 { when { other !is Test3 -> return false } - val tmp0_other_with_cast: Test3 = other as Test3 + val tmp_2: Test3 = other as Test3 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_2.#x).not() -> return false } return true } @@ -164,9 +164,9 @@ data class Test4 { when { other !is Test4 -> return false } - val tmp0_other_with_cast: Test4 = other as Test4 + val tmp_3: Test4 = other as Test4 when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_3.#x).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt index d8fe1cf9268..6691c2c2575 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/dataObject.kt.txt @@ -20,7 +20,7 @@ data object DataObject { when { other !is DataObject -> return false } - val tmp0_other_with_cast: DataObject = other as DataObject + val tmp_0: DataObject = other as DataObject return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt index ccac63b485b..59d242913f9 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.fir.kt.txt @@ -52,9 +52,9 @@ sealed class A : CharSequence { when { other !is B -> return false } - val tmp0_other_with_cast: B = other as B + val tmp_0: B = other as B when { - EQEQ(arg0 = .#c, arg1 = tmp0_other_with_cast.#c).not() -> return false + EQEQ(arg0 = .#c, arg1 = tmp_0.#c).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.kt.txt index b9871ca2017..101307e53c6 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/delegationInSealed.kt.txt @@ -52,9 +52,9 @@ sealed class A : CharSequence { when { other !is B -> return false } - val tmp0_other_with_cast: B = other as B + val tmp_0: B = other as B when { - EQEQ(arg0 = .#c, arg1 = tmp0_other_with_cast.#c).not() -> return false + EQEQ(arg0 = .#c, arg1 = tmp_0.#c).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt.txt index de04e526cd5..f0717b4a01e 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/kt31649.kt.txt @@ -35,9 +35,9 @@ data class TestData { when { other !is TestData -> return false } - val tmp0_other_with_cast: TestData = other as TestData + val tmp_0: TestData = other as TestData when { - EQEQ(arg0 = .#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false + EQEQ(arg0 = .#nn, arg1 = tmp_0.#nn).not() -> return false } return true } @@ -70,9 +70,9 @@ value class TestInline { when { other !is TestInline -> return false } - val tmp0_other_with_cast: TestInline = other as TestInline + val tmp_1: TestInline = other as TestInline when { - EQEQ(arg0 = .#nn, arg1 = tmp0_other_with_cast.#nn).not() -> return false + EQEQ(arg0 = .#nn, arg1 = tmp_1.#nn).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt index 168e6397cee..ade8c897d60 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.fir.kt.txt @@ -35,9 +35,9 @@ data class A { when { other !is A -> return false } - val tmp0_other_with_cast: A = other as A + val tmp_0: A = other as A when { - EQEQ(arg0 = .#runA, arg1 = tmp0_other_with_cast.#runA).not() -> return false + EQEQ(arg0 = .#runA, arg1 = tmp_0.#runA).not() -> return false } return true } @@ -89,9 +89,9 @@ data class B { when { other !is B -> return false } - val tmp0_other_with_cast: B = other as B + val tmp_1: B = other as B when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_1.#x).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt.txt index b549cf932d6..d4f809bedad 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/lambdaInDataClassDefaultParameter.kt.txt @@ -35,9 +35,9 @@ data class A { when { other !is A -> return false } - val tmp0_other_with_cast: A = other as A + val tmp_0: A = other as A when { - EQEQ(arg0 = .#runA, arg1 = tmp0_other_with_cast.#runA).not() -> return false + EQEQ(arg0 = .#runA, arg1 = tmp_0.#runA).not() -> return false } return true } @@ -89,9 +89,9 @@ data class B { when { other !is B -> return false } - val tmp0_other_with_cast: B = other as B + val tmp_1: B = other as B when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_1.#x).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt.txt b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt.txt index 048610182c2..684f90e0eb9 100644 --- a/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses/openDataClass.kt.txt @@ -43,12 +43,12 @@ open data class ValidatedProperties { when { other !is ValidatedProperties -> return false } - val tmp0_other_with_cast: ValidatedProperties = other as ValidatedProperties + val tmp_0: ValidatedProperties = other as ValidatedProperties when { - EQEQ(arg0 = .(), arg1 = tmp0_other_with_cast.()).not() -> return false + EQEQ(arg0 = .(), arg1 = tmp_0.()).not() -> return false } when { - EQEQ(arg0 = .(), arg1 = tmp0_other_with_cast.()).not() -> return false + EQEQ(arg0 = .(), arg1 = tmp_0.()).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/enum.fir.kt.txt b/compiler/testData/ir/irText/classes/enum.fir.kt.txt index fc20efc3530..f135e25de4f 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.kt.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.kt.txt @@ -179,9 +179,9 @@ enum class TestEnum6 : Enum { get TEST = { // BLOCK - val tmp0_y: Int = f() - val tmp1_x: Int = f() - TestEnum6(x = tmp1_x, y = tmp0_y) + val tmp_0: Int = f() + val tmp_1: Int = f() + TestEnum6(x = tmp_1, y = tmp_0) } fun values(): Array /* Synthetic body for ENUM_VALUES */ diff --git a/compiler/testData/ir/irText/classes/enum.kt.txt b/compiler/testData/ir/irText/classes/enum.kt.txt index 48d4ceb8bf9..342bd1509cc 100644 --- a/compiler/testData/ir/irText/classes/enum.kt.txt +++ b/compiler/testData/ir/irText/classes/enum.kt.txt @@ -179,9 +179,9 @@ enum class TestEnum6 : Enum { get TEST = { // BLOCK - val tmp0_y: Int = f() - val tmp1_x: Int = f() - TestEnum6(x = tmp1_x, y = tmp0_y) + val tmp_0: Int = f() + val tmp_1: Int = f() + TestEnum6(x = tmp_1, y = tmp_0) } fun values(): Array /* Synthetic body for ENUM_VALUES */ diff --git a/compiler/testData/ir/irText/classes/inlineClass.kt.txt b/compiler/testData/ir/irText/classes/inlineClass.kt.txt index ec5dccc1cca..ee2a919ba47 100644 --- a/compiler/testData/ir/irText/classes/inlineClass.kt.txt +++ b/compiler/testData/ir/irText/classes/inlineClass.kt.txt @@ -21,9 +21,9 @@ value class Test { when { other !is Test -> return false } - val tmp0_other_with_cast: Test = other as Test + val tmp_0: Test = other as Test when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt index 539459e3dd9..bb4ebd68b71 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt @@ -42,9 +42,9 @@ value class IC { when { other !is IC -> return false } - val tmp0_other_with_cast: IC = other as IC + val tmp_0: IC = other as IC when { - EQEQ(arg0 = .#c, arg1 = tmp0_other_with_cast.#c).not() -> return false + EQEQ(arg0 = .#c, arg1 = tmp_0.#c).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt index 7f413b695a8..b23c19e295d 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.kt.txt @@ -33,9 +33,9 @@ data class MyContainer { when { other !is MyContainer -> return false } - val tmp0_other_with_cast: MyContainer = other as MyContainer + val tmp_0: MyContainer = other as MyContainer when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -69,9 +69,9 @@ fun box(): String { var myContainer: MyContainer = MyContainer(i = 0) with(receiver = 1, block = local fun Int.() { myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK - val : MyContainer = myContainer - myContainer = .inc($context_receiver_0 = $this$with) - + val tmp_1: MyContainer = myContainer + myContainer = tmp_1.inc($context_receiver_0 = $this$with) + tmp_1 }.get($context_receiver_0 = $this$with, index = 0))) } ) diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.kt.txt index 2fb4d11922c..5bfcb4d2d13 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.kt.txt @@ -33,9 +33,9 @@ data class MyContainer { when { other !is MyContainer -> return false } - val tmp0_other_with_cast: MyContainer = other as MyContainer + val tmp_0: MyContainer = other as MyContainer when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -62,8 +62,8 @@ operator fun MyContainer.plusAssign($context_receiver_0: Int, other: MyContainer ( = ().plus(other = $context_receiver_0)) } { // BLOCK - val tmp0_this: MyContainer = - tmp0_this.( = tmp0_this.().plus(other = other.())) + val tmp_1: MyContainer = + tmp_1.( = tmp_1.().plus(other = other.())) } } @@ -78,9 +78,9 @@ fun box(): String { var myContainer: MyContainer = MyContainer(i = 0) with(receiver = 1, block = local fun Int.() { myContainer.plusAssign($context_receiver_0 = $this$with, other = MyContainer(i = { // BLOCK - val tmp0: MyContainer = myContainer - myContainer = tmp0.inc($context_receiver_0 = $this$with) - tmp0 + val tmp_2: MyContainer = myContainer + myContainer = tmp_2.inc($context_receiver_0 = $this$with) + tmp_2 }.get($context_receiver_0 = $this$with, index = 0))) } ) diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt index 0fa93b8ece3..ff25da40ff3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.fir.kt.txt @@ -33,9 +33,9 @@ data class MyContainer { when { other !is MyContainer -> return false } - val tmp0_other_with_cast: MyContainer = other as MyContainer + val tmp_0: MyContainer = other as MyContainer when { - EQEQ(arg0 = .#s, arg1 = tmp0_other_with_cast.#s).not() -> return false + EQEQ(arg0 = .#s, arg1 = tmp_0.#s).not() -> return false } return true } @@ -67,10 +67,10 @@ fun box(): String { val myContainer: MyContainer = MyContainer(s = "fail") myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK") return { // BLOCK - val : String? = myContainer.get($context_receiver_0 = $this$with, index = 0) + val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0) when { - EQEQ(arg0 = , arg1 = null) -> "fail" - else -> + EQEQ(arg0 = tmp_1, arg1 = null) -> "fail" + else -> tmp_1 } } } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.kt.txt index 369be3ad65d..c40a058ad0f 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessOperators.kt.txt @@ -33,9 +33,9 @@ data class MyContainer { when { other !is MyContainer -> return false } - val tmp0_other_with_cast: MyContainer = other as MyContainer + val tmp_0: MyContainer = other as MyContainer when { - EQEQ(arg0 = .#s, arg1 = tmp0_other_with_cast.#s).not() -> return false + EQEQ(arg0 = .#s, arg1 = tmp_0.#s).not() -> return false } return true } @@ -67,10 +67,10 @@ fun box(): String { val myContainer: MyContainer = MyContainer(s = "fail") myContainer.set($context_receiver_0 = $this$with, index = 0, value = "OK") return { // BLOCK - val tmp0_elvis_lhs: String? = myContainer.get($context_receiver_0 = $this$with, index = 0) + val tmp_1: String? = myContainer.get($context_receiver_0 = $this$with, index = 0) when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> "fail" - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_1, arg1 = null) -> "fail" + else -> tmp_1 } } } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt index ee182dcf0cf..43a14ae8900 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.kt.txt @@ -33,9 +33,9 @@ data class Result { when { other !is Result -> return false } - val tmp0_other_with_cast: Result = other as Result + val tmp_0: Result = other as Result when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.kt.txt index 010158f1eae..7aae1fb07ea 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.kt.txt @@ -33,9 +33,9 @@ data class Result { when { other !is Result -> return false } - val tmp0_other_with_cast: Result = other as Result + val tmp_0: Result = other as Result when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -59,8 +59,8 @@ operator fun Result.plusAssign($context_receiver_0: Int, other: Result) { ( = ().plus(other = $context_receiver_0)) } { // BLOCK - val tmp0_this: Result = - tmp0_this.( = tmp0_this.().plus(other = other.())) + val tmp_1: Result = + tmp_1.( = tmp_1.().plus(other = other.())) } } @@ -76,8 +76,8 @@ operator fun Result.minusAssign($context_receiver_0: Int, other: Result) { ( = ().plus(other = $context_receiver_0)) } { // BLOCK - val tmp0_this: Result = - tmp0_this.( = tmp0_this.().minus(other = other.())) + val tmp_2: Result = + tmp_2.( = tmp_2.().minus(other = other.())) } } @@ -93,8 +93,8 @@ operator fun Result.timesAssign($context_receiver_0: Int, other: Result) { ( = ().plus(other = $context_receiver_0)) } { // BLOCK - val tmp0_this: Result = - tmp0_this.( = tmp0_this.().times(other = other.())) + val tmp_3: Result = + tmp_3.( = tmp_3.().times(other = other.())) } } @@ -110,8 +110,8 @@ operator fun Result.divAssign($context_receiver_0: Int, other: Result) { ( = ().plus(other = $context_receiver_0)) } { // BLOCK - val tmp0_this: Result = - tmp0_this.( = tmp0_this.().div(other = other.())) + val tmp_4: Result = + tmp_4.( = tmp_4.().div(other = other.())) } } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt index 69ff6ac43ea..08f1aa3e2d3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.fir.kt.txt @@ -48,12 +48,12 @@ data class Pair { when { other !is Pair -> return false } - val tmp0_other_with_cast: Pair = other as Pair + val tmp_0: Pair = other as Pair when { - EQEQ(arg0 = .#first, arg1 = tmp0_other_with_cast.#first).not() -> return false + EQEQ(arg0 = .#first, arg1 = tmp_0.#first).not() -> return false } when { - EQEQ(arg0 = .#second, arg1 = tmp0_other_with_cast.#second).not() -> return false + EQEQ(arg0 = .#second, arg1 = tmp_0.#second).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt.txt index 5965505f41d..7a19c3a22a4 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/compareTo.kt.txt @@ -48,12 +48,12 @@ data class Pair { when { other !is Pair -> return false } - val tmp0_other_with_cast: Pair = other as Pair + val tmp_0: Pair = other as Pair when { - EQEQ(arg0 = .#first, arg1 = tmp0_other_with_cast.#first).not() -> return false + EQEQ(arg0 = .#first, arg1 = tmp_0.#first).not() -> return false } when { - EQEQ(arg0 = .#second, arg1 = tmp0_other_with_cast.#second).not() -> return false + EQEQ(arg0 = .#second, arg1 = tmp_0.#second).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt index 5f556d19afc..0737f936ef3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.kt.txt @@ -33,9 +33,9 @@ data class Counter { when { other !is Counter -> return false } - val tmp0_other_with_cast: Counter = other as Counter + val tmp_0: Counter = other as Counter when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -76,9 +76,9 @@ data class CounterConfig { when { other !is CounterConfig -> return false } - val tmp0_other_with_cast: CounterConfig = other as CounterConfig + val tmp_1: CounterConfig = other as CounterConfig when { - EQEQ(arg0 = .#max, arg1 = tmp0_other_with_cast.#max).not() -> return false + EQEQ(arg0 = .#max, arg1 = tmp_1.#max).not() -> return false } return true } @@ -104,10 +104,10 @@ class CounterIterator : Iterator { override operator fun next(): Int { return { // BLOCK - val : Counter = .() - val : Int = .() - .( = .inc()) - + val tmp_2: Counter = .() + val tmp_3: Int = tmp_2.() + tmp_2.( = tmp_3.inc()) + tmp_3 } } @@ -124,9 +124,9 @@ fun box(): String { var result: Int = 0 with(receiver = CounterConfig(), block = local fun CounterConfig.() { { // BLOCK - val : CounterIterator = Counter().iterator($context_receiver_0 = $this$with) - while (.hasNext()) { // BLOCK - val i: Int = .next() + val tmp_4: CounterIterator = Counter().iterator($context_receiver_0 = $this$with) + while (tmp_4.hasNext()) { // BLOCK + val i: Int = tmp_4.next() { // BLOCK result = result.plus(other = i) } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.kt.txt index 32209a42f11..a9551f60e52 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.kt.txt @@ -33,9 +33,9 @@ data class Counter { when { other !is Counter -> return false } - val tmp0_other_with_cast: Counter = other as Counter + val tmp_0: Counter = other as Counter when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -76,9 +76,9 @@ data class CounterConfig { when { other !is CounterConfig -> return false } - val tmp0_other_with_cast: CounterConfig = other as CounterConfig + val tmp_1: CounterConfig = other as CounterConfig when { - EQEQ(arg0 = .#max, arg1 = tmp0_other_with_cast.#max).not() -> return false + EQEQ(arg0 = .#max, arg1 = tmp_1.#max).not() -> return false } return true } @@ -104,11 +104,11 @@ class CounterIterator : Iterator { override operator fun next(): Int { return { // BLOCK - val tmp0_this: Counter = .() + val tmp_2: Counter = .() { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_3: Int = tmp_2.() + tmp_2.( = tmp_3.inc()) + tmp_3 } } } @@ -126,9 +126,9 @@ fun box(): String { var result: Int = 0 with(receiver = CounterConfig(), block = local fun CounterConfig.() { { // BLOCK - val tmp0_iterator: CounterIterator = Counter().iterator($context_receiver_0 = $this$with) - while (tmp0_iterator.hasNext()) { // BLOCK - val i: Int = tmp0_iterator.next() + val tmp_4: CounterIterator = Counter().iterator($context_receiver_0 = $this$with) + while (tmp_4.hasNext()) { // BLOCK + val i: Int = tmp_4.next() { // BLOCK result = result.plus(other = i) } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt index a7d9cf4d38f..f2692a22839 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.kt.txt @@ -32,9 +32,9 @@ data class Result { when { other !is Result -> return false } - val tmp0_other_with_cast: Result = other as Result + val tmp_0: Result = other as Result when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -73,21 +73,21 @@ fun box(): String { var result: Result = Result(i = 0) with(receiver = 1, block = local fun Int.(): Result { { // BLOCK - val : Result = result - result = .inc($context_receiver_0 = $this$with) - + val tmp_1: Result = result + result = tmp_1.inc($context_receiver_0 = $this$with) + tmp_1 } /*~> Unit */ { // BLOCK - val : Result = result - result = .inc($context_receiver_0 = $this$with) - + val tmp_2: Result = result + result = tmp_2.inc($context_receiver_0 = $this$with) + tmp_2 } /*~> Unit */ result.unaryMinus($context_receiver_0 = $this$with) /*~> Unit */ result.unaryPlus($context_receiver_0 = $this$with) /*~> Unit */ return { // BLOCK - val : Result = result - result = .dec($context_receiver_0 = $this$with) - + val tmp_3: Result = result + result = tmp_3.dec($context_receiver_0 = $this$with) + tmp_3 } } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.kt.txt index 223c03a3847..5c94d338289 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.kt.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.kt.txt @@ -32,9 +32,9 @@ data class Result { when { other !is Result -> return false } - val tmp0_other_with_cast: Result = other as Result + val tmp_0: Result = other as Result when { - EQEQ(arg0 = .#i, arg1 = tmp0_other_with_cast.#i).not() -> return false + EQEQ(arg0 = .#i, arg1 = tmp_0.#i).not() -> return false } return true } @@ -81,21 +81,21 @@ fun box(): String { var result: Result = Result(i = 0) with(receiver = 1, block = local fun Int.(): Result { { // BLOCK - val tmp0: Result = result - result = tmp0.inc($context_receiver_0 = $this$with) - tmp0 + val tmp_1: Result = result + result = tmp_1.inc($context_receiver_0 = $this$with) + tmp_1 } /*~> Unit */ { // BLOCK - val tmp1: Result = result - result = tmp1.inc($context_receiver_0 = $this$with) - tmp1 + val tmp_2: Result = result + result = tmp_2.inc($context_receiver_0 = $this$with) + tmp_2 } /*~> Unit */ result.unaryMinus($context_receiver_0 = $this$with) /*~> Unit */ result.unaryPlus($context_receiver_0 = $this$with) /*~> Unit */ return { // BLOCK - val tmp2: Result = result - result = tmp2.dec($context_receiver_0 = $this$with) - tmp2 + val tmp_3: Result = result + result = tmp_3.dec($context_receiver_0 = $this$with) + tmp_3 } } ) /*~> Unit */ diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt index fc336bd34fe..e82484e320a 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.fir.kt.txt @@ -21,9 +21,9 @@ value class IT { when { other !is IT -> return false } - val tmp0_other_with_cast: IT = other as IT + val tmp_0: IT = other as IT when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } return true } @@ -98,9 +98,9 @@ value class InlineMutableSet : MutableSet { when { other !is InlineMutableSet -> return false } - val tmp0_other_with_cast: InlineMutableSet = other as InlineMutableSet + val tmp_1: InlineMutableSet = other as InlineMutableSet when { - EQEQ(arg0 = .#ms, arg1 = tmp0_other_with_cast.#ms).not() -> return false + EQEQ(arg0 = .#ms, arg1 = tmp_1.#ms).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt index 47b2b6b074a..2d379c5a065 100644 --- a/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt +++ b/compiler/testData/ir/irText/declarations/inlineCollectionOfInlineClass.kt.txt @@ -21,9 +21,9 @@ value class IT { when { other !is IT -> return false } - val tmp0_other_with_cast: IT = other as IT + val tmp_0: IT = other as IT when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } return true } @@ -98,9 +98,9 @@ value class InlineMutableSet : MutableSet { when { other !is InlineMutableSet -> return false } - val tmp0_other_with_cast: InlineMutableSet = other as InlineMutableSet + val tmp_1: InlineMutableSet = other as InlineMutableSet when { - EQEQ(arg0 = .#ms, arg1 = tmp0_other_with_cast.#ms).not() -> return false + EQEQ(arg0 = .#ms, arg1 = tmp_1.#ms).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt index a659c3abc05..4fc5ca2a3fb 100644 --- a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.fir.kt.txt @@ -33,9 +33,9 @@ data class MyRec : Record { when { other !is MyRec -> return false } - val tmp0_other_with_cast: MyRec = other as MyRec + val tmp_0: MyRec = other as MyRec when { - EQEQ(arg0 = .#name, arg1 = tmp0_other_with_cast.#name).not() -> return false + EQEQ(arg0 = .#name, arg1 = tmp_0.#name).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.kt.txt b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.kt.txt index ba59a70d228..7c7c05a5ce5 100644 --- a/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.kt.txt +++ b/compiler/testData/ir/irText/declarations/jvmRecord/dataClassWithJvmRecord.kt.txt @@ -33,9 +33,9 @@ data class MyRec : Record { when { other !is MyRec -> return false } - val tmp0_other_with_cast: MyRec = other as MyRec + val tmp_0: MyRec = other as MyRec when { - EQEQ(arg0 = .#name, arg1 = tmp0_other_with_cast.#name).not() -> return false + EQEQ(arg0 = .#name, arg1 = tmp_0.#name).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/kt47527.fir.kt.txt b/compiler/testData/ir/irText/declarations/kt47527.fir.kt.txt index 70c5491e71a..eadc8c65adb 100644 --- a/compiler/testData/ir/irText/declarations/kt47527.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt47527.fir.kt.txt @@ -1,9 +1,9 @@ fun test_1(value: Any?): String? { return { // BLOCK - val tmp0_safe_receiver: Any? = value + val tmp_0: Any? = value when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: Any): Nothing { + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.let(block = local fun (it: Any): Nothing { return "O" } ) @@ -14,10 +14,10 @@ fun test_1(value: Any?): String? { fun test_2(value: Any?): String? { return run(block = local fun (): String? { return { // BLOCK - val tmp1_safe_receiver: Any? = value + val tmp_1: Any? = value when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.let(block = local fun (it: Any): Nothing { + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.let(block = local fun (it: Any): Nothing { return "K" } ) @@ -30,17 +30,17 @@ fun test_2(value: Any?): String? { fun box(): String { var result: String = "" result = result.plus(other = { // BLOCK - val : String? = test_1(value = 1) + val tmp_2: String? = test_1(value = 1) when { - EQEQ(arg0 = , arg1 = null) -> return "fail 1" - else -> + EQEQ(arg0 = tmp_2, arg1 = null) -> return "fail 1" + else -> tmp_2 } }) result = result.plus(other = { // BLOCK - val : String? = test_2(value = 1) + val tmp_3: String? = test_2(value = 1) when { - EQEQ(arg0 = , arg1 = null) -> return "fail 2" - else -> + EQEQ(arg0 = tmp_3, arg1 = null) -> return "fail 2" + else -> tmp_3 } }) return result diff --git a/compiler/testData/ir/irText/declarations/kt47527.kt.txt b/compiler/testData/ir/irText/declarations/kt47527.kt.txt index 7685baea9e8..42df742bc06 100644 --- a/compiler/testData/ir/irText/declarations/kt47527.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt47527.kt.txt @@ -1,9 +1,9 @@ fun test_1(value: Any?): String? { return { // BLOCK - val tmp0_safe_receiver: Any? = value + val tmp_0: Any? = value when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: Any): Nothing { + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.let(block = local fun (it: Any): Nothing { return "O" } ) @@ -14,10 +14,10 @@ fun test_1(value: Any?): String? { fun test_2(value: Any?): String? { return run(block = local fun (): Nothing? { return { // BLOCK - val tmp0_safe_receiver: Any? = value + val tmp_1: Any? = value when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: Any): Nothing { + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.let(block = local fun (it: Any): Nothing { return "K" } ) @@ -30,17 +30,17 @@ fun test_2(value: Any?): String? { fun box(): String { var result: String = "" result = result.plus(other = { // BLOCK - val tmp0_elvis_lhs: String? = test_1(value = 1) + val tmp_2: String? = test_1(value = 1) when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> return "fail 1" - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_2, arg1 = null) -> return "fail 1" + else -> tmp_2 } }) result = result.plus(other = { // BLOCK - val tmp1_elvis_lhs: String? = test_2(value = 1) + val tmp_3: String? = test_2(value = 1) when { - EQEQ(arg0 = tmp1_elvis_lhs, arg1 = null) -> return "fail 2" - else -> tmp1_elvis_lhs + EQEQ(arg0 = tmp_3, arg1 = null) -> return "fail 2" + else -> tmp_3 } }) return result diff --git a/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt b/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt index 683de19961d..3d0b6cde922 100644 --- a/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt52677.fir.kt.txt @@ -47,9 +47,9 @@ data class LoginSuccessPacket { when { other !is LoginSuccessPacket -> return false } - val tmp0_other_with_cast: LoginSuccessPacket = other as LoginSuccessPacket + val tmp_0: LoginSuccessPacket = other as LoginSuccessPacket when { - EQEQ(arg0 = .#id, arg1 = tmp0_other_with_cast.#id).not() -> return false + EQEQ(arg0 = .#id, arg1 = tmp_0.#id).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/kt52677.kt.txt b/compiler/testData/ir/irText/declarations/kt52677.kt.txt index 5252fc3486a..b5b83b33e02 100644 --- a/compiler/testData/ir/irText/declarations/kt52677.kt.txt +++ b/compiler/testData/ir/irText/declarations/kt52677.kt.txt @@ -46,9 +46,9 @@ data class LoginSuccessPacket { when { other !is LoginSuccessPacket -> return false } - val tmp0_other_with_cast: LoginSuccessPacket = other as LoginSuccessPacket + val tmp_0: LoginSuccessPacket = other as LoginSuccessPacket when { - EQEQ(arg0 = .#id, arg1 = tmp0_other_with_cast.#id).not() -> return false + EQEQ(arg0 = .#id, arg1 = tmp_0.#id).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt index fc163cb0e75..271e9d17bc8 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.kt.txt @@ -23,9 +23,9 @@ fun test2() { ( = 0) { // BLOCK - val : Int = () - ( = .inc()) - + val tmp_0: Int = () + ( = tmp_0.inc()) + tmp_0 } /*~> Unit */ ( = ().plus(other = 1)) } diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt index f635254e98b..93f665e89bf 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.kt.txt @@ -23,9 +23,9 @@ fun test2() { (value = 0) { // BLOCK - val tmp0: Int = () - (value = tmp0.inc()) - tmp0 + val tmp_0: Int = () + (value = tmp_0.inc()) + tmp_0 } /*~> Unit */ (value = ().plus(other = 1)) } diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt index 6ef3ce2ed74..81c4cbb64f3 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt @@ -45,12 +45,12 @@ data class Test { when { other !is Test -> return false } - val tmp0_other_with_cast: Test = other as Test + val tmp_0: Test = other as Test when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_0.#y).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.kt.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.kt.txt index 540bb16f892..3230f3a99fc 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.kt.txt @@ -22,24 +22,24 @@ class C { fun testVariable() { var x: IntArray = foo() { // BLOCK - val : IntArray = x - val : Int = 0 - .set(index = , value = .get(index = ).plus(other = 1)) + val tmp_0: IntArray = x + val tmp_1: Int = 0 + tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 1)) } } fun testCall() { { // BLOCK - val : IntArray = foo() - val : Int = bar() - .set(index = , value = .get(index = ).times(other = 2)) + val tmp_2: IntArray = foo() + val tmp_3: Int = bar() + tmp_2.set(index = tmp_3, value = tmp_2.get(index = tmp_3).times(other = 2)) } } fun testMember(c: C) { - val : IntArray = c.() - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .inc()) - /*~> Unit */ + val tmp_4: IntArray = c.() + val tmp_5: Int = 0 + val tmp_6: Int = tmp_4.get(index = tmp_5) + tmp_4.set(index = tmp_5, value = tmp_6.inc()) + tmp_6 /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt.txt index 5742c6d0875..b9b3a354624 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.kt.txt @@ -22,26 +22,26 @@ class C { fun testVariable() { var x: IntArray = foo() { // BLOCK - val tmp0_array: IntArray = x - val tmp1_index0: Int = 0 - tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 1)) + val tmp_0: IntArray = x + val tmp_1: Int = 0 + tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 1)) } } fun testCall() { { // BLOCK - val tmp0_array: IntArray = foo() - val tmp1_index0: Int = bar() - tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).times(other = 2)) + val tmp_2: IntArray = foo() + val tmp_3: Int = bar() + tmp_2.set(index = tmp_3, value = tmp_2.get(index = tmp_3).times(other = 2)) } } fun testMember(c: C) { { // BLOCK - val tmp0_array: IntArray = c.() - val tmp1_index0: Int = 0 - val tmp2: Int = tmp0_array.get(index = tmp1_index0) - tmp0_array.set(index = tmp1_index0, value = tmp2.inc()) - tmp2 + val tmp_4: IntArray = c.() + val tmp_5: Int = 0 + val tmp_6: Int = tmp_4.get(index = tmp_5) + tmp_4.set(index = tmp_5, value = tmp_6.inc()) + tmp_6 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.fir.kt.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.fir.kt.txt index 8592f9cdd32..f331a774160 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.fir.kt.txt @@ -10,8 +10,8 @@ interface IB { fun IB.test(a: IA) { { // BLOCK - val : IA = a - val : String = "" - (, ).set(index = , value = .get(index = ).plus(other = 42)) + val tmp_0: IA = a + val tmp_1: String = "" + (, tmp_0).set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42)) } } diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt.txt index a20d56dd6fe..f331a774160 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.kt.txt @@ -10,8 +10,8 @@ interface IB { fun IB.test(a: IA) { { // BLOCK - val tmp0_array: IA = a - val tmp1_index0: String = "" - (, tmp0_array).set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 42)) + val tmp_0: IA = a + val tmp_1: String = "" + (, tmp_0).set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42)) } } diff --git a/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt.txt b/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt.txt index 182cf672ea3..2887866c587 100644 --- a/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt.txt +++ b/compiler/testData/ir/irText/expressions/badInlinedBreakContinue.kt.txt @@ -13,9 +13,9 @@ inline fun baz(crossinline block: Function0) { inline fun Iterable.myForEach(action: Function1) { { // BLOCK - val tmp0_iterator: Iterator = .iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val element: T = tmp0_iterator.next() + val tmp_0: Iterator = .iterator() + while (tmp_0.hasNext()) { // BLOCK + val element: T = tmp_0.next() action.invoke(p1 = element) } } diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt index 242cc56348b..20fdeee8732 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.kt.txt @@ -4,10 +4,10 @@ fun test1(a: Any?): Any { fun test2(a: Any?): Int { return CHECK_NOT_NULL(arg0 = { // BLOCK - val tmp0_safe_receiver: Any? = a + val tmp_0: Any? = a when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.hashCode() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.hashCode() } }) } diff --git a/compiler/testData/ir/irText/expressions/bangbang.kt.txt b/compiler/testData/ir/irText/expressions/bangbang.kt.txt index a2703527a6b..2c7f6fa4daa 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.kt.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.kt.txt @@ -4,10 +4,10 @@ fun test1(a: Any?): Any { fun test2(a: Any?): Int { return CHECK_NOT_NULL(arg0 = { // BLOCK - val tmp0_safe_receiver: Any? = a + val tmp_0: Any? = a when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.hashCode() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.hashCode() } }) } diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.kt.txt index 712bb2b23be..75420e322d0 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.kt.txt @@ -1,10 +1,10 @@ fun test1(c: Boolean?) { L@ while (true) { // BLOCK L2@ while ({ // BLOCK - val : Boolean? = c + val tmp_0: Boolean? = c when { - EQEQ(arg0 = , arg1 = null) -> break@L - else -> + EQEQ(arg0 = tmp_0, arg1 = null) -> break@L + else -> tmp_0 } }) } @@ -13,10 +13,10 @@ fun test1(c: Boolean?) { fun test2(c: Boolean?) { L@ while (true) { // BLOCK L2@ while ({ // BLOCK - val : Boolean? = c + val tmp_1: Boolean? = c when { - EQEQ(arg0 = , arg1 = null) -> continue@L - else -> + EQEQ(arg0 = tmp_1, arg1 = null) -> continue@L + else -> tmp_1 } }) } @@ -25,15 +25,15 @@ fun test2(c: Boolean?) { fun test3(ss: List?) { L@ while (true) { // BLOCK { // BLOCK - val : Iterator = { // BLOCK - val : List? = ss + val tmp_2: Iterator = { // BLOCK + val tmp_3: List? = ss when { - EQEQ(arg0 = , arg1 = null) -> continue@L - else -> + EQEQ(arg0 = tmp_3, arg1 = null) -> continue@L + else -> tmp_3 } }.iterator() - L2@ while (.hasNext()) { // BLOCK - val s: String = .next() + L2@ while (tmp_2.hasNext()) { // BLOCK + val s: String = tmp_2.next() } } } @@ -42,15 +42,15 @@ fun test3(ss: List?) { fun test4(ss: List?) { L@ while (true) { // BLOCK { // BLOCK - val : Iterator = { // BLOCK - val : List? = ss + val tmp_4: Iterator = { // BLOCK + val tmp_5: List? = ss when { - EQEQ(arg0 = , arg1 = null) -> break@L - else -> + EQEQ(arg0 = tmp_5, arg1 = null) -> break@L + else -> tmp_5 } }.iterator() - L2@ while (.hasNext()) { // BLOCK - val s: String = .next() + L2@ while (tmp_4.hasNext()) { // BLOCK + val s: String = tmp_4.next() } } } diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt.txt index 1d0e4755de5..45c267d7962 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.kt.txt @@ -1,10 +1,10 @@ fun test1(c: Boolean?) { L@ while (true) { // BLOCK L2@ while ({ // BLOCK - val tmp0_elvis_lhs: Boolean? = c + val tmp_0: Boolean? = c when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> break - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> break + else -> tmp_0 } }) } @@ -13,10 +13,10 @@ fun test1(c: Boolean?) { fun test2(c: Boolean?) { L@ while (true) { // BLOCK L2@ while ({ // BLOCK - val tmp0_elvis_lhs: Boolean? = c + val tmp_1: Boolean? = c when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> continue - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_1, arg1 = null) -> continue + else -> tmp_1 } }) } @@ -25,15 +25,15 @@ fun test2(c: Boolean?) { fun test3(ss: List?) { L@ while (true) { // BLOCK { // BLOCK - val tmp1_iterator: Iterator = { // BLOCK - val tmp0_elvis_lhs: List? = ss + val tmp_2: Iterator = { // BLOCK + val tmp_3: List? = ss when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> continue - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_3, arg1 = null) -> continue + else -> tmp_3 } }.iterator() - L2@ while (tmp1_iterator.hasNext()) { // BLOCK - val s: String = tmp1_iterator.next() + L2@ while (tmp_2.hasNext()) { // BLOCK + val s: String = tmp_2.next() } } } @@ -42,15 +42,15 @@ fun test3(ss: List?) { fun test4(ss: List?) { L@ while (true) { // BLOCK { // BLOCK - val tmp1_iterator: Iterator = { // BLOCK - val tmp0_elvis_lhs: List? = ss + val tmp_4: Iterator = { // BLOCK + val tmp_5: List? = ss when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> break - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_5, arg1 = null) -> break + else -> tmp_5 } }.iterator() - L2@ while (tmp1_iterator.hasNext()) { // BLOCK - val s: String = tmp1_iterator.next() + L2@ while (tmp_4.hasNext()) { // BLOCK + val s: String = tmp_4.next() } } } diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.kt.txt index 1ff539b50f4..eda72100900 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.kt.txt @@ -5,9 +5,9 @@ fun testBreakFor() { ) var k: Int = 0 { // BLOCK - val : IntIterator = xs.iterator() - while (.hasNext()) { // BLOCK - val x: Int = .next() + val tmp_0: IntIterator = xs.iterator() + while (tmp_0.hasNext()) { // BLOCK + val x: Int = tmp_0.next() { // BLOCK when { greater(arg0 = k, arg1 = 2) -> break @@ -44,9 +44,9 @@ fun testContinueFor() { ) var k: Int = 0 { // BLOCK - val : IntIterator = xs.iterator() - while (.hasNext()) { // BLOCK - val x: Int = .next() + val tmp_1: IntIterator = xs.iterator() + while (tmp_1.hasNext()) { // BLOCK + val x: Int = tmp_1.next() { // BLOCK when { greater(arg0 = k, arg1 = 2) -> continue diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt index 76bc6a94125..26d364adaa7 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt @@ -5,9 +5,9 @@ fun testBreakFor() { ) var k: Int = 0 { // BLOCK - val tmp0_iterator: IntIterator = xs.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: Int = tmp0_iterator.next() + val tmp_0: IntIterator = xs.iterator() + while (tmp_0.hasNext()) { // BLOCK + val x: Int = tmp_0.next() { // BLOCK when { greater(arg0 = k, arg1 = 2) -> break @@ -44,9 +44,9 @@ fun testContinueFor() { ) var k: Int = 0 { // BLOCK - val tmp0_iterator: IntIterator = xs.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: Int = tmp0_iterator.next() + val tmp_1: IntIterator = xs.iterator() + while (tmp_1.hasNext()) { // BLOCK + val x: Int = tmp_1.next() { // BLOCK when { greater(arg0 = k, arg1 = 2) -> continue diff --git a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt.txt index 2c1d4eddc74..7099a0f3601 100644 --- a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.kt.txt @@ -20,12 +20,12 @@ fun reordered2(): Int { fun test() { foo(a = noReorder1(), b = noReorder2()) { // BLOCK - val tmp0_b: Int = reordered1() - val tmp1_a: Int = reordered2() - foo(a = tmp1_a, b = tmp0_b) + val tmp_0: Int = reordered1() + val tmp_1: Int = reordered2() + foo(a = tmp_1, b = tmp_0) } { // BLOCK - val tmp2_a: Int = reordered2() - foo(a = tmp2_a, b = 1) + val tmp_2: Int = reordered2() + foo(a = tmp_2, b = 1) } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt index 4b1d542b844..adf62b0e84d 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.fir.kt.txt @@ -45,37 +45,37 @@ fun withVararg(vararg xs: Int): Int { fun test1() { { // BLOCK - val : A = A - val : Function1 = { // BLOCK + val tmp_0: A = A + val tmp_1: Function1 = { // BLOCK local fun withVararg(p0: Int) { withVararg(xs = [p0]) } ::withVararg } - .set(i = /*-> IFoo */, newValue = .get(i = /*-> IFoo */).plus(other = 1)) + tmp_0.set(i = tmp_1 /*-> IFoo */, newValue = tmp_0.get(i = tmp_1 /*-> IFoo */).plus(other = 1)) } } fun test2() { { // BLOCK - val : B = B - val : Function1 = { // BLOCK + val tmp_2: B = B + val tmp_3: Function1 = { // BLOCK local fun withVararg(p0: Int) { withVararg(xs = [p0]) } ::withVararg } - .set(i = /*-> IFoo2 */, newValue = .get(i = /*-> IFoo */).plus(other = 1)) + tmp_2.set(i = tmp_3 /*-> IFoo2 */, newValue = tmp_2.get(i = tmp_3 /*-> IFoo */).plus(other = 1)) } } fun test3(fn: Function1) { { // BLOCK - val : A = A - val : Function1 = fn - .set(i = /*-> IFoo */, newValue = .get(i = /*-> IFoo */).plus(other = 1)) + val tmp_4: A = A + val tmp_5: Function1 = fn + tmp_4.set(i = tmp_5 /*-> IFoo */, newValue = tmp_4.get(i = tmp_5 /*-> IFoo */).plus(other = 1)) } } @@ -83,9 +83,9 @@ fun test4(fn: Function1) { when { fn is IFoo -> { // BLOCK { // BLOCK - val : A = A - val : IFoo = fn /*as IFoo */ - .set(i = , newValue = .get(i = ).plus(other = 1)) + val tmp_6: A = A + val tmp_7: IFoo = fn /*as IFoo */ + tmp_6.set(i = tmp_7, newValue = tmp_6.get(i = tmp_7).plus(other = 1)) } } } @@ -94,9 +94,9 @@ fun test4(fn: Function1) { fun test5(a: Any) { a as Function1 /*~> Unit */ { // BLOCK - val : A = A - val : Function1 = a /*as Function1 */ - .set(i = /*-> IFoo */, newValue = .get(i = /*-> IFoo */).plus(other = 1)) + val tmp_8: A = A + val tmp_9: Function1 = a /*as Function1 */ + tmp_8.set(i = tmp_9 /*-> IFoo */, newValue = tmp_8.get(i = tmp_9 /*-> IFoo */).plus(other = 1)) } } @@ -104,9 +104,9 @@ fun test6(a: Any) { a as Function1 /*~> Unit */ a /*as Function1 */ as IFoo /*~> Unit */ { // BLOCK - val : A = A - val : Function1 = a /*as Function1 */ - .set(i = , newValue = .get(i = ).plus(other = 1)) + val tmp_10: A = A + val tmp_11: Function1 = a /*as Function1 */ + tmp_10.set(i = tmp_11, newValue = tmp_10.get(i = tmp_11).plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt index c001c484440..1e3c7570915 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/caoWithAdaptationForSam.kt.txt @@ -45,37 +45,37 @@ fun withVararg(vararg xs: Int): Int { fun test1() { { // BLOCK - val tmp0_array: A = A - val tmp2_sam: IFoo = { // BLOCK + val tmp_0: A = A + val tmp_1: IFoo = { // BLOCK local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } ::withVararg } /*-> IFoo */ - tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) + tmp_0.set(i = tmp_1, newValue = tmp_0.get(i = tmp_1).plus(other = 1)) } } fun test2() { { // BLOCK - val tmp0_array: B = B - val tmp2_sam: IFoo2 = { // BLOCK + val tmp_2: B = B + val tmp_3: IFoo2 = { // BLOCK local fun withVararg(p0: Int) { withVararg(xs = [p0]) /*~> Unit */ } ::withVararg } /*-> IFoo2 */ - tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) + tmp_2.set(i = tmp_3, newValue = tmp_2.get(i = tmp_3).plus(other = 1)) } } fun test3(fn: Function1) { { // BLOCK - val tmp0_array: A = A - val tmp2_sam: IFoo = fn /*-> IFoo */ - tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) + val tmp_4: A = A + val tmp_5: IFoo = fn /*-> IFoo */ + tmp_4.set(i = tmp_5, newValue = tmp_4.get(i = tmp_5).plus(other = 1)) } } @@ -83,9 +83,9 @@ fun test4(fn: Function1) { when { fn is IFoo -> { // BLOCK { // BLOCK - val tmp0_array: A = A - val tmp1_index0: Function1 = fn - tmp0_array.set(i = tmp1_index0 /*as IFoo */, newValue = tmp0_array.get(i = tmp1_index0 /*as IFoo */).plus(other = 1)) + val tmp_6: A = A + val tmp_7: Function1 = fn + tmp_6.set(i = tmp_7 /*as IFoo */, newValue = tmp_6.get(i = tmp_7 /*as IFoo */).plus(other = 1)) } } } @@ -94,9 +94,9 @@ fun test4(fn: Function1) { fun test5(a: Any) { a as Function1 /*~> Unit */ { // BLOCK - val tmp0_array: A = A - val tmp2_sam: IFoo = a /*as Function1 */ /*-> IFoo */ - tmp0_array.set(i = tmp2_sam, newValue = tmp0_array.get(i = tmp2_sam).plus(other = 1)) + val tmp_8: A = A + val tmp_9: IFoo = a /*as Function1 */ /*-> IFoo */ + tmp_8.set(i = tmp_9, newValue = tmp_8.get(i = tmp_9).plus(other = 1)) } } @@ -104,8 +104,8 @@ fun test6(a: Any) { a as Function1 /*~> Unit */ a as IFoo /*~> Unit */ { // BLOCK - val tmp0_array: A = A - val tmp1_index0: Any = a - tmp0_array.set(i = tmp1_index0 /*as IFoo */, newValue = tmp0_array.get(i = tmp1_index0 /*as IFoo */).plus(other = 1)) + val tmp_10: A = A + val tmp_11: Any = a + tmp_10.set(i = tmp_11 /*as IFoo */, newValue = tmp_10.get(i = tmp_11 /*as IFoo */).plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt index 5f0670a3820..83f6269b5b6 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt @@ -1,9 +1,9 @@ fun sum(vararg args: Int): Int { var result: Int = 0 { // BLOCK - val : IntIterator = args.iterator() - while (.hasNext()) { // BLOCK - val arg: Int = .next() + val tmp_0: IntIterator = args.iterator() + while (tmp_0.hasNext()) { // BLOCK + val arg: Int = tmp_0.next() { // BLOCK result = result.plus(other = arg) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt index 456c1fef677..04ade2b48d6 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt @@ -1,9 +1,9 @@ fun sum(vararg args: Int): Int { var result: Int = 0 { // BLOCK - val tmp0_iterator: IntIterator = args.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val arg: Int = tmp0_iterator.next() + val tmp_0: IntIterator = args.iterator() + while (tmp_0.hasNext()) { // BLOCK + val arg: Int = tmp_0.next() result = result.plus(other = arg) } } diff --git a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt.txt b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt.txt index 3d536fba7ee..2d73a1a1c67 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.kt.txt @@ -17,28 +17,28 @@ class C { fun test(nc: C?): C? { return { // BLOCK - val tmp3_safe_receiver: C? = { // BLOCK - val tmp2_safe_receiver: C? = { // BLOCK - val tmp1_safe_receiver: C? = { // BLOCK - val tmp0_safe_receiver: C? = nc + val tmp_0: C? = { // BLOCK + val tmp_1: C? = { // BLOCK + val tmp_2: C? = { // BLOCK + val tmp_3: C? = nc when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.foo() + EQEQ(arg0 = tmp_3, arg1 = null) -> null + else -> tmp_3.foo() } } when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.bar() + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.bar() } } when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.foo() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.foo() } } when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null - else -> tmp3_safe_receiver.foo() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.foo() } } } diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt index 314dbdee30e..211ec3aa19d 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.fir.kt.txt @@ -11,17 +11,17 @@ fun test2(mc: MutableCollection) { fun test3() { { // BLOCK - val tmp0_safe_receiver: @FlexibleNullability PrintStream? = #out + val tmp_0: @FlexibleNullability PrintStream? = #out when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.println(p0 = "Hello,") + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.println(p0 = "Hello,") } } /*~> Unit */ { // BLOCK - val tmp1_safe_receiver: @FlexibleNullability PrintStream? = #out + val tmp_1: @FlexibleNullability PrintStream? = #out when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.println(p0 = "world!") + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.println(p0 = "world!") } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt index fb989403c5c..741a7f87488 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.kt.txt @@ -11,17 +11,17 @@ fun test2(mc: MutableCollection) { fun test3() { { // BLOCK - val tmp0_safe_receiver: @FlexibleNullability PrintStream? = super.#out + val tmp_0: @FlexibleNullability PrintStream? = super.#out when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver /*!! PrintStream */.println(p0 = "Hello,") + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0 /*!! PrintStream */.println(p0 = "Hello,") } } /*~> Unit */ { // BLOCK - val tmp1_safe_receiver: @FlexibleNullability PrintStream? = super.#out + val tmp_1: @FlexibleNullability PrintStream? = super.#out when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver /*!! PrintStream */.println(p0 = "world!") + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1 /*!! PrintStream */.println(p0 = "world!") } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.kt.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.kt.txt index 4e6764f92ee..aa0050f4279 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.kt.txt @@ -42,32 +42,32 @@ object X1 { fun test1(a: IntArray) { var i: Int = 0 - val : IntArray = a - val : Int = { // BLOCK - val : Int = i - i = .inc() - + val tmp_0: IntArray = a + val tmp_1: Int = { // BLOCK + val tmp_2: Int = i + i = tmp_2.inc() + tmp_2 } - val : Int = .get(index = ) - .set(index = , value = .inc()) - /*~> Unit */ + val tmp_3: Int = tmp_0.get(index = tmp_1) + tmp_0.set(index = tmp_1, value = tmp_3.inc()) + tmp_3 /*~> Unit */ } fun test2() { { // BLOCK - val : Int = X1.() - X1.( = .inc()) - + val tmp_4: Int = X1.() + X1.( = tmp_4.inc()) + tmp_4 } /*~> Unit */ { // BLOCK - val : Int = X2.() - X2.( = .inc()) - + val tmp_5: Int = X2.() + X2.( = tmp_5.inc()) + tmp_5 } /*~> Unit */ { // BLOCK - val : Int = X3.() - X3.( = .inc()) - + val tmp_6: Int = X3.() + X3.( = tmp_6.inc()) + tmp_6 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt index bfe53b81e9c..ec704e2d2f8 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt @@ -43,41 +43,41 @@ object X1 { fun test1(a: IntArray) { var i: Int = 0 { // BLOCK - val tmp1_array: IntArray = a - val tmp2_index0: Int = { // BLOCK - val tmp0: Int = i - i = tmp0.inc() - tmp0 + val tmp_0: IntArray = a + val tmp_1: Int = { // BLOCK + val tmp_2: Int = i + i = tmp_2.inc() + tmp_2 } - val tmp3: Int = tmp1_array.get(index = tmp2_index0) - tmp1_array.set(index = tmp2_index0, value = tmp3.inc()) - tmp3 + val tmp_3: Int = tmp_0.get(index = tmp_1) + tmp_0.set(index = tmp_1, value = tmp_3.inc()) + tmp_3 } /*~> Unit */ } fun test2() { { // BLOCK - val tmp0_this: X1 = X1 + val tmp_4: X1 = X1 { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_5: Int = tmp_4.() + tmp_4.( = tmp_5.inc()) + tmp_5 } } /*~> Unit */ { // BLOCK - val tmp2_this: X2 = X2 + val tmp_6: X2 = X2 { // BLOCK - val tmp3: Int = tmp2_this.() - tmp2_this.( = tmp3.inc()) - tmp3 + val tmp_7: Int = tmp_6.() + tmp_6.( = tmp_7.inc()) + tmp_7 } } /*~> Unit */ { // BLOCK - val tmp4_this: X3 = X3 + val tmp_8: X3 = X3 { // BLOCK - val tmp5: Int = tmp4_this.() - tmp4_this.( = tmp5.inc()) - tmp5 + val tmp_9: Int = tmp_8.() + tmp_8.( = tmp_9.inc()) + tmp_9 } } /*~> Unit */ } @@ -105,8 +105,8 @@ object Host { operator fun B.plusAssign(b: B) { { // BLOCK - val tmp0_this: B = - tmp0_this.( = tmp0_this.().plus(other = b.())) + val tmp_10: B = + tmp_10.( = tmp_10.().plus(other = b.())) } } diff --git a/compiler/testData/ir/irText/expressions/destructuring1.fir.kt.txt b/compiler/testData/ir/irText/expressions/destructuring1.fir.kt.txt index a5f746ddfba..c9c96902f93 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.fir.kt.txt @@ -25,7 +25,7 @@ object B { } fun B.test() { - val : A = A - val x: Int = (, ).component1() - val y: Int = (, ).component2() + val tmp_0: A = A + val x: Int = (, tmp_0).component1() + val y: Int = (, tmp_0).component2() } diff --git a/compiler/testData/ir/irText/expressions/destructuring1.kt.txt b/compiler/testData/ir/irText/expressions/destructuring1.kt.txt index 6db7638ef9f..781827946c6 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.kt.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.kt.txt @@ -26,8 +26,8 @@ object B { fun B.test() { // COMPOSITE { - val tmp0_container: A = A - val x: Int = (, tmp0_container).component1() - val y: Int = (, tmp0_container).component2() + val tmp_0: A = A + val x: Int = (, tmp_0).component1() + val y: Int = (, tmp_0).component2() // } } diff --git a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.kt.txt b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.kt.txt index ae855d61c3d..e30b6cc854a 100644 --- a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.kt.txt @@ -29,7 +29,7 @@ object B { } fun B.test() { - val : A = A - val x: Int = (, ).component1() - val z: Int = (, ).component3() + val tmp_0: A = A + val x: Int = (, tmp_0).component1() + val z: Int = (, tmp_0).component3() } diff --git a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt.txt b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt.txt index fb2fa4d79a6..21feb25e2b6 100644 --- a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt.txt +++ b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.kt.txt @@ -30,8 +30,8 @@ object B { fun B.test() { // COMPOSITE { - val tmp0_container: A = A - val x: Int = (, tmp0_container).component1() - val z: Int = (, tmp0_container).component3() + val tmp_0: A = A + val x: Int = (, tmp_0).component1() + val z: Int = (, tmp_0).component3() // } } diff --git a/compiler/testData/ir/irText/expressions/dotQualified.kt.txt b/compiler/testData/ir/irText/expressions/dotQualified.kt.txt index c51eec9e70b..bdbcc7c3ada 100644 --- a/compiler/testData/ir/irText/expressions/dotQualified.kt.txt +++ b/compiler/testData/ir/irText/expressions/dotQualified.kt.txt @@ -4,10 +4,10 @@ fun length(s: String): Int { fun lengthN(s: String?): Int? { return { // BLOCK - val tmp0_safe_receiver: String? = s + val tmp_0: String? = s when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } } } diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt b/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt deleted file mode 100644 index 09cda5fd2a8..00000000000 --- a/compiler/testData/ir/irText/expressions/elvis.fir.ir.txt +++ /dev/null @@ -1,111 +0,0 @@ -FILE fqName: fileName:/elvis.kt - PROPERTY name:p visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Any? visibility:private [final,static] - EXPRESSION_BODY - CONST Null type=kotlin.Nothing? value=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Any? - correspondingProperty: PROPERTY name:p visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any? declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Any? visibility:private [final,static]' type=kotlin.Any? origin=null - FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (): kotlin.Any? declared in ' - CONST Null type=kotlin.Nothing? value=null - FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any) returnType:kotlin.Any - VALUE_PARAMETER name:a index:0 type:kotlin.Any? - VALUE_PARAMETER name:b index:1 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?, b: kotlin.Any): kotlin.Any declared in ' - BLOCK type=kotlin.Any origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val] - GET_VAR 'a: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null - WHEN type=kotlin.Any origin=null - 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.Any? declared in .test1' type=kotlin.Any? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'b: kotlin.Any declared in .test1' type=kotlin.Any origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_0: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null - FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String?, b:kotlin.Any) returnType:kotlin.Any - VALUE_PARAMETER name:a index:0 type:kotlin.String? - VALUE_PARAMETER name:b index:1 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.String?, b: kotlin.Any): kotlin.Any declared in ' - BLOCK type=kotlin.Any origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val] - GET_VAR 'a: kotlin.String? declared in .test2' type=kotlin.String? origin=null - WHEN type=kotlin.Any origin=null - 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.String? declared in .test2' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'b: kotlin.Any declared in .test2' type=kotlin.Any origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_1: kotlin.String? declared in .test2' type=kotlin.String? origin=null - FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any?) returnType:kotlin.String - VALUE_PARAMETER name:a index:0 type:kotlin.Any? - VALUE_PARAMETER name:b index:1 type:kotlin.Any? - BLOCK_BODY - WHEN type=kotlin.Unit origin=IF - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' - CONST String type=kotlin.String value="" - WHEN type=kotlin.Unit origin=IF - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String? - GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - then: RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' - CONST String type=kotlin.String value="" - RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' - BLOCK type=kotlin.String origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val] - TYPE_OP type=kotlin.String? origin=IMPLICIT_CAST typeOperand=kotlin.String? - GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - WHEN type=kotlin.String origin=null - 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.String? declared in .test3' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.Any? origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_2: kotlin.String? declared in .test3' type=kotlin.String? origin=null - FUN name:test4 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any): kotlin.Any declared in ' - BLOCK type=kotlin.Any origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Any? [val] - CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=GET_PROPERTY - WHEN type=kotlin.Any origin=null - 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.Any? declared in .test4' type=kotlin.Any? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'x: kotlin.Any declared in .test4' type=kotlin.Any origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_3: kotlin.Any? declared in .test4' type=kotlin.Any? origin=null - FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any - VALUE_PARAMETER name:x index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test5 (x: kotlin.Any): kotlin.Any declared in ' - BLOCK type=kotlin.Any origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Any? [val] - CALL 'public final fun foo (): kotlin.Any? declared in ' type=kotlin.Any? origin=null - WHEN type=kotlin.Any origin=null - 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.Any? declared in .test5' type=kotlin.Any? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'x: kotlin.Any declared in .test5' type=kotlin.Any origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_4: kotlin.Any? declared in .test5' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.kt.txt b/compiler/testData/ir/irText/expressions/elvis.fir.kt.txt deleted file mode 100644 index d0e3af4f105..00000000000 --- a/compiler/testData/ir/irText/expressions/elvis.fir.kt.txt +++ /dev/null @@ -1,63 +0,0 @@ -val p: Any? - field = null - get - -fun foo(): Any? { - return null -} - -fun test1(a: Any?, b: Any): Any { - return { // BLOCK - val : Any? = a - when { - EQEQ(arg0 = , arg1 = null) -> b - else -> - } - } -} - -fun test2(a: String?, b: Any): Any { - return { // BLOCK - val : String? = a - when { - EQEQ(arg0 = , arg1 = null) -> b - else -> - } - } -} - -fun test3(a: Any?, b: Any?): String { - when { - b !is String -> return "" - } - when { - a !is String? -> return "" - } - return { // BLOCK - val : String? = a /*as String? */ - when { - EQEQ(arg0 = , arg1 = null) -> b /*as String */ - else -> - } - } -} - -fun test4(x: Any): Any { - return { // BLOCK - val : Any? = () - when { - EQEQ(arg0 = , arg1 = null) -> x - else -> - } - } -} - -fun test5(x: Any): Any { - return { // BLOCK - val : Any? = foo() - when { - EQEQ(arg0 = , arg1 = null) -> x - else -> - } - } -} diff --git a/compiler/testData/ir/irText/expressions/elvis.kt b/compiler/testData/ir/irText/expressions/elvis.kt index af35ea9bffc..06981c6f346 100644 --- a/compiler/testData/ir/irText/expressions/elvis.kt +++ b/compiler/testData/ir/irText/expressions/elvis.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL val p: Any? = null fun foo(): Any? = null diff --git a/compiler/testData/ir/irText/expressions/elvis.kt.txt b/compiler/testData/ir/irText/expressions/elvis.kt.txt index af5a43191e1..2e1153fed21 100644 --- a/compiler/testData/ir/irText/expressions/elvis.kt.txt +++ b/compiler/testData/ir/irText/expressions/elvis.kt.txt @@ -8,20 +8,20 @@ fun foo(): Any? { fun test1(a: Any?, b: Any): Any { return { // BLOCK - val tmp0_elvis_lhs: Any? = a + val tmp_0: Any? = a when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> b + else -> tmp_0 } } } fun test2(a: String?, b: Any): Any { return { // BLOCK - val tmp0_elvis_lhs: String? = a + val tmp_1: String? = a when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_1, arg1 = null) -> b + else -> tmp_1 } } } @@ -34,30 +34,30 @@ fun test3(a: Any?, b: Any?): String { a !is String? -> return "" } return { // BLOCK - val tmp0_elvis_lhs: String? = a /*as String? */ + val tmp_2: String? = a /*as String? */ when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> b /*as String */ - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_2, arg1 = null) -> b /*as String */ + else -> tmp_2 } } } fun test4(x: Any): Any { return { // BLOCK - val tmp0_elvis_lhs: Any? = () + val tmp_3: Any? = () when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> x - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_3, arg1 = null) -> x + else -> tmp_3 } } } fun test5(x: Any): Any { return { // BLOCK - val tmp0_elvis_lhs: Any? = foo() + val tmp_4: Any? = foo() when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> x - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_4, arg1 = null) -> x + else -> tmp_4 } } } diff --git a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.kt.txt b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.kt.txt index 579adeb7073..12345b2c463 100644 --- a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.kt.txt @@ -19,9 +19,9 @@ enum class A : Enum { fun testVariableAssignment_throws(a: A) { val x: Int { // BLOCK - val tmp0_subject: A = a + val tmp_0: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = A.V1) -> { // BLOCK x = 11 } else -> noWhenBranchMatchedException() @@ -31,9 +31,9 @@ fun testVariableAssignment_throws(a: A) { fun testStatement_empty(a: A) { { // BLOCK - val tmp1_subject: A = a + val tmp_1: A = a when { - EQEQ(arg0 = tmp1_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_1, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } /*~> Unit */ @@ -41,9 +41,9 @@ fun testStatement_empty(a: A) { fun testParenthesized_throwsJvm(a: A) { { // BLOCK - val tmp2_subject: A = a + val tmp_2: A = a when { - EQEQ(arg0 = tmp2_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_2, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } /*~> Unit */ @@ -51,9 +51,9 @@ fun testParenthesized_throwsJvm(a: A) { fun testAnnotated_throwsJvm(a: A) { { // BLOCK - val tmp3_subject: A = a + val tmp_3: A = a when { - EQEQ(arg0 = tmp3_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_3, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } /*~> Unit */ @@ -61,9 +61,9 @@ fun testAnnotated_throwsJvm(a: A) { fun testExpression_throws(a: A): Int { return { // BLOCK - val tmp4_subject: A = a + val tmp_4: A = a when { - EQEQ(arg0 = tmp4_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_4, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } @@ -74,9 +74,9 @@ fun testIfTheElseStatement_empty(a: A, flag: Boolean) { flag -> 0 else -> { // BLOCK { // BLOCK - val tmp5_subject: A = a + val tmp_5: A = a when { - EQEQ(arg0 = tmp5_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_5, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } @@ -89,9 +89,9 @@ fun testIfTheElseParenthesized_throwsJvm(a: A, flag: Boolean) { flag -> 0 else -> { // BLOCK { // BLOCK - val tmp6_subject: A = a + val tmp_6: A = a when { - EQEQ(arg0 = tmp6_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_6, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } @@ -104,9 +104,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) { flag -> 0 else -> { // BLOCK { // BLOCK - val tmp7_subject: A = a + val tmp_7: A = a when { - EQEQ(arg0 = tmp7_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_7, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } @@ -117,9 +117,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) { fun testLambdaResultExpression_throws(a: A) { local fun (): Int { return { // BLOCK - val tmp8_subject: A = a + val tmp_8: A = a when { - EQEQ(arg0 = tmp8_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_8, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } diff --git a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt index 4692c723bdd..fb46e628bec 100644 --- a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt +++ b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.kt.txt @@ -19,9 +19,9 @@ enum class A : Enum { fun testVariableAssignment_throws(a: A) { val x: Int { // BLOCK - val tmp0_subject: A = a + val tmp_0: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> x = 11 + EQEQ(arg0 = tmp_0, arg1 = A.V1) -> x = 11 else -> noWhenBranchMatchedException() } } @@ -29,36 +29,36 @@ fun testVariableAssignment_throws(a: A) { fun testStatement_empty(a: A) { { // BLOCK - val tmp0_subject: A = a + val tmp_1: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_1, arg1 = A.V1) -> 1 /*~> Unit */ } } } fun testParenthesized_throwsJvm(a: A) { { // BLOCK - val tmp0_subject: A = a + val tmp_2: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_2, arg1 = A.V1) -> 1 /*~> Unit */ } } } fun testAnnotated_throwsJvm(a: A) { { // BLOCK - val tmp0_subject: A = a + val tmp_3: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_3, arg1 = A.V1) -> 1 /*~> Unit */ } } } fun testExpression_throws(a: A): Int { return { // BLOCK - val tmp0_subject: A = a + val tmp_4: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_4, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } @@ -69,9 +69,9 @@ fun testIfTheElseStatement_empty(a: A, flag: Boolean) { flag -> 0 /*~> Unit */ else -> { // BLOCK { // BLOCK - val tmp0_subject: A = a + val tmp_5: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_5, arg1 = A.V1) -> 1 /*~> Unit */ } } } @@ -83,9 +83,9 @@ fun testIfTheElseParenthesized_throwsJvm(a: A, flag: Boolean) { flag -> 0 /*~> Unit */ else -> { // BLOCK { // BLOCK - val tmp0_subject: A = a + val tmp_6: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_6, arg1 = A.V1) -> 1 /*~> Unit */ } } } @@ -97,9 +97,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) { flag -> 0 /*~> Unit */ else -> { // BLOCK { // BLOCK - val tmp0_subject: A = a + val tmp_7: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_7, arg1 = A.V1) -> 1 /*~> Unit */ } } } @@ -109,9 +109,9 @@ fun testIfTheElseAnnotated_throwsJvm(a: A, flag: Boolean) { fun testLambdaResultExpression_throws(a: A) { local fun (): Int { return { // BLOCK - val tmp0_subject: A = a + val tmp_8: A = a when { - EQEQ(arg0 = tmp0_subject, arg1 = A.V1) -> 1 + EQEQ(arg0 = tmp_8, arg1 = A.V1) -> 1 else -> noWhenBranchMatchedException() } } diff --git a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt.txt b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt.txt index 8cad7f16b03..49ec55e93f7 100644 --- a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt.txt +++ b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.kt.txt @@ -1,9 +1,9 @@ fun test(receiver: Any?, fn: @ExtensionFunctionType Function3): Unit? { return { // BLOCK - val tmp0_safe_receiver: Any? = receiver + val tmp_0: Any? = receiver when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> fn.invoke(p1 = tmp0_safe_receiver, p2 = 42, p3 = "Hello") + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> fn.invoke(p1 = tmp_0, p2 = 42, p3 = "Hello") } } } diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.kt.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.kt.txt index 2321e225eae..45c6555062c 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.fir.kt.txt @@ -5,10 +5,10 @@ fun testDD(x: Double?, y: Double?): Boolean { fun testDF(x: Double?, y: Any?): Boolean { return when { y is Float? -> ieee754equals(arg0 = x, arg1 = { // BLOCK - val tmp0_safe_receiver: Float? = y /*as Float? */ + val tmp_0: Float? = y /*as Float? */ when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toDouble() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toDouble() } }) else -> false @@ -18,10 +18,10 @@ fun testDF(x: Double?, y: Any?): Boolean { fun testDI(x: Double?, y: Any?): Boolean { return when { y is Int? -> ieee754equals(arg0 = x, arg1 = { // BLOCK - val tmp1_safe_receiver: Int? = y /*as Int? */ + val tmp_1: Int? = y /*as Int? */ when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.toDouble() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.toDouble() } }) else -> false @@ -34,10 +34,10 @@ fun testDI2(x: Any?, y: Any?): Boolean { x is Int? -> y is Double else -> false } -> ieee754equals(arg0 = { // BLOCK - val tmp2_safe_receiver: Int? = x /*as Int? */ + val tmp_2: Int? = x /*as Int? */ when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.toDouble() + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.toDouble() } }, arg1 = y /*as Double? */) else -> false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt.txt index cec49f53667..e862025c680 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/nullableFloatingPointEqeq.kt.txt @@ -5,10 +5,10 @@ fun testDD(x: Double?, y: Double?): Boolean { fun testDF(x: Double?, y: Any?): Boolean { return when { y is Float? -> ieee754equals(arg0 = x, arg1 = { // BLOCK - val tmp0_safe_receiver: Any? = y + val tmp_0: Any? = y when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver /*as Float */.toDouble() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0 /*as Float */.toDouble() } }) else -> false @@ -18,10 +18,10 @@ fun testDF(x: Double?, y: Any?): Boolean { fun testDI(x: Double?, y: Any?): Boolean { return when { y is Int? -> ieee754equals(arg0 = x, arg1 = { // BLOCK - val tmp0_safe_receiver: Any? = y + val tmp_1: Any? = y when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver /*as Int */.toDouble() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1 /*as Int */.toDouble() } }) else -> false @@ -34,10 +34,10 @@ fun testDI2(x: Any?, y: Any?): Boolean { x is Int? -> y is Double else -> false } -> ieee754equals(arg0 = { // BLOCK - val tmp0_safe_receiver: Any? = x + val tmp_2: Any? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver /*as Int */.toDouble() + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2 /*as Int */.toDouble() } }, arg1 = y /*as Double? */) else -> false diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.kt.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.kt.txt index 8fbfc26ffdb..c78d312ca50 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.fir.kt.txt @@ -1,8 +1,8 @@ fun testSimple(x: Double): Int { return { // BLOCK - val tmp0_subject: Double = x + val tmp_0: Double = x when { - ieee754equals(arg0 = tmp0_subject, arg1 = 0.0) -> 0 + ieee754equals(arg0 = tmp_0, arg1 = 0.0) -> 0 else -> 1 } } @@ -13,9 +13,9 @@ fun testSmartCastInWhenSubject(x: Any): Int { x !is Double -> return -1 } return { // BLOCK - val tmp1_subject: Double = x /*as Double */ + val tmp_1: Double = x /*as Double */ when { - ieee754equals(arg0 = tmp1_subject, arg1 = 0.0) -> 0 + ieee754equals(arg0 = tmp_1, arg1 = 0.0) -> 0 else -> 1 } } @@ -26,9 +26,9 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int { y !is Double -> return -1 } return { // BLOCK - val tmp2_subject: Double = x + val tmp_2: Double = x when { - ieee754equals(arg0 = tmp2_subject, arg1 = y /*as Double */) -> 0 + ieee754equals(arg0 = tmp_2, arg1 = y /*as Double */) -> 0 else -> 1 } } @@ -36,10 +36,10 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int { fun testSmartCastInWhenConditionInBranch(x: Any): Int { return { // BLOCK - val tmp3_subject: Any = x + val tmp_3: Any = x when { - tmp3_subject !is Double -> -1 - ieee754equals(arg0 = tmp3_subject /*as Double */, arg1 = 0.0) -> 0 + tmp_3 !is Double -> -1 + ieee754equals(arg0 = tmp_3 /*as Double */, arg1 = 0.0) -> 0 else -> 1 } } @@ -53,9 +53,9 @@ fun testSmartCastToDifferentTypes(x: Any, y: Any): Int { y !is Float -> return -1 } return { // BLOCK - val tmp4_subject: Double = x /*as Double */ + val tmp_4: Double = x /*as Double */ when { - ieee754equals(arg0 = tmp4_subject, arg1 = y /*as Float */.toDouble()) -> 0 + ieee754equals(arg0 = tmp_4, arg1 = y /*as Float */.toDouble()) -> 0 else -> 1 } } @@ -67,9 +67,9 @@ fun foo(x: Double): Double { fun testWithPrematureExitInConditionSubexpression(x: Any): Int { return { // BLOCK - val tmp5_subject: Any = x + val tmp_5: Any = x when { - EQEQ(arg0 = tmp5_subject, arg1 = foo(x = when { + EQEQ(arg0 = tmp_5, arg1 = foo(x = when { x !is Double -> return 42 else -> x /*as Double */ })) -> 0 diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt.txt index 1004c04faf1..0d6193bab54 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/whenByFloatingPoint.kt.txt @@ -1,8 +1,8 @@ fun testSimple(x: Double): Int { return { // BLOCK - val tmp0_subject: Double = x + val tmp_0: Double = x when { - ieee754equals(arg0 = tmp0_subject, arg1 = 0.0) -> 0 + ieee754equals(arg0 = tmp_0, arg1 = 0.0) -> 0 else -> 1 } } @@ -13,9 +13,9 @@ fun testSmartCastInWhenSubject(x: Any): Int { x !is Double -> return -1 } return { // BLOCK - val tmp0_subject: Any = x + val tmp_1: Any = x when { - ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0 + ieee754equals(arg0 = tmp_1 /*as Double */, arg1 = 0.0) -> 0 else -> 1 } } @@ -26,9 +26,9 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int { y !is Double -> return -1 } return { // BLOCK - val tmp0_subject: Double = x + val tmp_2: Double = x when { - ieee754equals(arg0 = tmp0_subject, arg1 = y /*as Double */) -> 0 + ieee754equals(arg0 = tmp_2, arg1 = y /*as Double */) -> 0 else -> 1 } } @@ -36,10 +36,10 @@ fun testSmartCastInWhenCondition(x: Double, y: Any): Int { fun testSmartCastInWhenConditionInBranch(x: Any): Int { return { // BLOCK - val tmp0_subject: Any = x + val tmp_3: Any = x when { - tmp0_subject is Double.not() -> -1 - ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = 0.0) -> 0 + tmp_3 is Double.not() -> -1 + ieee754equals(arg0 = tmp_3 /*as Double */, arg1 = 0.0) -> 0 else -> 1 } } @@ -53,9 +53,9 @@ fun testSmartCastToDifferentTypes(x: Any, y: Any): Int { y !is Float -> return -1 } return { // BLOCK - val tmp0_subject: Any = x + val tmp_4: Any = x when { - ieee754equals(arg0 = tmp0_subject /*as Double */, arg1 = y /*as Float */.toDouble()) -> 0 + ieee754equals(arg0 = tmp_4 /*as Double */, arg1 = y /*as Float */.toDouble()) -> 0 else -> 1 } } @@ -67,9 +67,9 @@ fun foo(x: Double): Double { fun testWithPrematureExitInConditionSubexpression(x: Any): Int { return { // BLOCK - val tmp0_subject: Any = x + val tmp_5: Any = x when { - EQEQ(arg0 = tmp0_subject, arg1 = foo(x = when { + EQEQ(arg0 = tmp_5, arg1 = foo(x = when { x !is Double -> return 42 else -> x /*as Double */ })) -> 0 diff --git a/compiler/testData/ir/irText/expressions/for.fir.ir.txt b/compiler/testData/ir/irText/expressions/for.fir.ir.txt deleted file mode 100644 index 317288ca2c4..00000000000 --- a/compiler/testData/ir/irText/expressions/for.fir.ir.txt +++ /dev/null @@ -1,72 +0,0 @@ -FILE fqName: fileName:/for.kt - FUN name:testEmpty visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit - VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List - BLOCK_BODY - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.Iterator [val] - CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR - $this: GET_VAR 'ss: kotlin.collections.List declared in .testEmpty' type=kotlin.collections.List origin=null - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.Iterator declared in .testEmpty' type=kotlin.collections.Iterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val] - CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.Iterator declared in .testEmpty' type=kotlin.collections.Iterator origin=null - FUN name:testIterable visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit - VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List - BLOCK_BODY - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.Iterator [val] - CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=FOR_LOOP_ITERATOR - $this: GET_VAR 'ss: kotlin.collections.List declared in .testIterable' type=kotlin.collections.List origin=null - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator declared in .testIterable' type=kotlin.collections.Iterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val] - CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator declared in .testIterable' type=kotlin.collections.Iterator origin=null - BLOCK type=kotlin.Unit origin=null - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_VAR 'val s: kotlin.String declared in .testIterable' type=kotlin.String origin=null - FUN name:testDestructuring visibility:public modality:FINAL <> (pp:kotlin.collections.List>) returnType:kotlin.Unit - VALUE_PARAMETER name:pp index:0 type:kotlin.collections.List> - BLOCK_BODY - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.Iterator> [val] - CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=FOR_LOOP_ITERATOR - $this: GET_VAR 'pp: kotlin.collections.List> declared in .testDestructuring' type=kotlin.collections.List> origin=null - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator> declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Pair [val] - CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.Pair origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.Iterator> declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null - VAR name:i type:kotlin.Int [val] - CALL 'public final fun component1 (): A of kotlin.Pair declared in kotlin.Pair' type=kotlin.Int origin=COMPONENT_N(index=1) - $this: GET_VAR 'val tmp_3: kotlin.Pair declared in .testDestructuring' type=kotlin.Pair origin=null - VAR name:s type:kotlin.String [val] - CALL 'public final fun component2 (): B of kotlin.Pair declared in kotlin.Pair' type=kotlin.String origin=COMPONENT_N(index=2) - $this: GET_VAR 'val tmp_3: kotlin.Pair declared in .testDestructuring' type=kotlin.Pair origin=null - BLOCK type=kotlin.Unit origin=null - CALL 'public final fun println (message: kotlin.Int): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_VAR 'val i: kotlin.Int declared in .testDestructuring' type=kotlin.Int origin=null - CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit declared in kotlin.io' type=kotlin.Unit origin=null - message: GET_VAR 'val s: kotlin.String declared in .testDestructuring' type=kotlin.String origin=null - FUN name:testRange visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_4 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=1 - other: CONST Int type=kotlin.Int value=10 - 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_4: kotlin.collections.IntIterator declared in .testRange' 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_4: kotlin.collections.IntIterator declared in .testRange' type=kotlin.collections.IntIterator origin=null diff --git a/compiler/testData/ir/irText/expressions/for.fir.kt.txt b/compiler/testData/ir/irText/expressions/for.fir.kt.txt deleted file mode 100644 index 866d31d9226..00000000000 --- a/compiler/testData/ir/irText/expressions/for.fir.kt.txt +++ /dev/null @@ -1,45 +0,0 @@ -fun testEmpty(ss: List) { - { // BLOCK - val : Iterator = ss.iterator() - while (.hasNext()) { // BLOCK - val s: String = .next() - } - } -} - -fun testIterable(ss: List) { - { // BLOCK - val : Iterator = ss.iterator() - while (.hasNext()) { // BLOCK - val s: String = .next() - { // BLOCK - println(message = s) - } - } - } -} - -fun testDestructuring(pp: List>) { - { // BLOCK - val : Iterator> = pp.iterator() - while (.hasNext()) { // BLOCK - val : Pair = .next() - val i: Int = .component1() - val s: String = .component2() - { // BLOCK - println(message = i) - println(message = s) - } - } - } -} - -fun testRange() { - { // BLOCK - val : IntIterator = 1.rangeTo(other = 10).iterator() - while (.hasNext()) { // BLOCK - val i: Int = .next() - } - } -} - diff --git a/compiler/testData/ir/irText/expressions/for.kt b/compiler/testData/ir/irText/expressions/for.kt index 94986c0c697..ea1d2ce5724 100644 --- a/compiler/testData/ir/irText/expressions/for.kt +++ b/compiler/testData/ir/irText/expressions/for.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_STDLIB // IGNORE_BACKEND: JS_IR // IGNORE_BACKEND: JS_IR_ES6 diff --git a/compiler/testData/ir/irText/expressions/for.kt.txt b/compiler/testData/ir/irText/expressions/for.kt.txt index 8e000ae7ce9..69918029e0e 100644 --- a/compiler/testData/ir/irText/expressions/for.kt.txt +++ b/compiler/testData/ir/irText/expressions/for.kt.txt @@ -1,17 +1,17 @@ fun testEmpty(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val s: String = tmp0_iterator.next() + val tmp_0: Iterator = ss.iterator() + while (tmp_0.hasNext()) { // BLOCK + val s: String = tmp_0.next() } } } fun testIterable(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val s: String = tmp0_iterator.next() + val tmp_1: Iterator = ss.iterator() + while (tmp_1.hasNext()) { // BLOCK + val s: String = tmp_1.next() { // BLOCK println(message = s) } @@ -21,11 +21,11 @@ fun testIterable(ss: List) { fun testDestructuring(pp: List>) { { // BLOCK - val tmp0_iterator: Iterator> = pp.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val tmp1_loop_parameter: Pair = tmp0_iterator.next() - val i: Int = tmp1_loop_parameter.component1() - val s: String = tmp1_loop_parameter.component2() + val tmp_2: Iterator> = pp.iterator() + while (tmp_2.hasNext()) { // BLOCK + val tmp_3: Pair = tmp_2.next() + val i: Int = tmp_3.component1() + val s: String = tmp_3.component2() { // BLOCK println(message = i) println(message = s) @@ -36,9 +36,9 @@ fun testDestructuring(pp: List>) { fun testRange() { { // BLOCK - val tmp0_iterator: IntIterator = 1.rangeTo(other = 10).iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val i: Int = tmp0_iterator.next() + val tmp_4: IntIterator = 1.rangeTo(other = 10).iterator() + while (tmp_4.hasNext()) { // BLOCK + val i: Int = tmp_4.next() } } } diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.kt.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.kt.txt index 44b90fd6d2c..5ef6760671c 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.kt.txt @@ -1,8 +1,8 @@ fun testForBreak1(ss: List) { { // BLOCK - val : Iterator = ss.iterator() - while (.hasNext()) { // BLOCK - val s: String = .next() + val tmp_0: Iterator = ss.iterator() + while (tmp_0.hasNext()) { // BLOCK + val s: String = tmp_0.next() { // BLOCK break } @@ -12,14 +12,14 @@ fun testForBreak1(ss: List) { fun testForBreak2(ss: List) { { // BLOCK - val : Iterator = ss.iterator() - OUTER@ while (.hasNext()) { // BLOCK - val s1: String = .next() + val tmp_1: Iterator = ss.iterator() + OUTER@ while (tmp_1.hasNext()) { // BLOCK + val s1: String = tmp_1.next() { // BLOCK { // BLOCK - val : Iterator = ss.iterator() - INNER@ while (.hasNext()) { // BLOCK - val s2: String = .next() + val tmp_2: Iterator = ss.iterator() + INNER@ while (tmp_2.hasNext()) { // BLOCK + val s2: String = tmp_2.next() { // BLOCK break@OUTER break@INNER @@ -35,9 +35,9 @@ fun testForBreak2(ss: List) { fun testForContinue1(ss: List) { { // BLOCK - val : Iterator = ss.iterator() - while (.hasNext()) { // BLOCK - val s: String = .next() + val tmp_3: Iterator = ss.iterator() + while (tmp_3.hasNext()) { // BLOCK + val s: String = tmp_3.next() { // BLOCK continue } @@ -47,14 +47,14 @@ fun testForContinue1(ss: List) { fun testForContinue2(ss: List) { { // BLOCK - val : Iterator = ss.iterator() - OUTER@ while (.hasNext()) { // BLOCK - val s1: String = .next() + val tmp_4: Iterator = ss.iterator() + OUTER@ while (tmp_4.hasNext()) { // BLOCK + val s1: String = tmp_4.next() { // BLOCK { // BLOCK - val : Iterator = ss.iterator() - INNER@ while (.hasNext()) { // BLOCK - val s2: String = .next() + val tmp_5: Iterator = ss.iterator() + INNER@ while (tmp_5.hasNext()) { // BLOCK + val s2: String = tmp_5.next() { // BLOCK continue@OUTER continue@INNER diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.kt.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.kt.txt index e373a5cccb5..b93c9473a79 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.kt.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.kt.txt @@ -1,8 +1,8 @@ fun testForBreak1(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val s: String = tmp0_iterator.next() + val tmp_0: Iterator = ss.iterator() + while (tmp_0.hasNext()) { // BLOCK + val s: String = tmp_0.next() { // BLOCK break } @@ -12,14 +12,14 @@ fun testForBreak1(ss: List) { fun testForBreak2(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - OUTER@ while (tmp0_iterator.hasNext()) { // BLOCK - val s1: String = tmp0_iterator.next() + val tmp_1: Iterator = ss.iterator() + OUTER@ while (tmp_1.hasNext()) { // BLOCK + val s1: String = tmp_1.next() { // BLOCK { // BLOCK - val tmp1_iterator: Iterator = ss.iterator() - INNER@ while (tmp1_iterator.hasNext()) { // BLOCK - val s2: String = tmp1_iterator.next() + val tmp_2: Iterator = ss.iterator() + INNER@ while (tmp_2.hasNext()) { // BLOCK + val s2: String = tmp_2.next() { // BLOCK break@OUTER break@INNER @@ -35,9 +35,9 @@ fun testForBreak2(ss: List) { fun testForContinue1(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val s: String = tmp0_iterator.next() + val tmp_3: Iterator = ss.iterator() + while (tmp_3.hasNext()) { // BLOCK + val s: String = tmp_3.next() { // BLOCK continue } @@ -47,14 +47,14 @@ fun testForContinue1(ss: List) { fun testForContinue2(ss: List) { { // BLOCK - val tmp0_iterator: Iterator = ss.iterator() - OUTER@ while (tmp0_iterator.hasNext()) { // BLOCK - val s1: String = tmp0_iterator.next() + val tmp_4: Iterator = ss.iterator() + OUTER@ while (tmp_4.hasNext()) { // BLOCK + val s1: String = tmp_4.next() { // BLOCK { // BLOCK - val tmp1_iterator: Iterator = ss.iterator() - INNER@ while (tmp1_iterator.hasNext()) { // BLOCK - val s2: String = tmp1_iterator.next() + val tmp_5: Iterator = ss.iterator() + INNER@ while (tmp_5.hasNext()) { // BLOCK + val s2: String = tmp_5.next() { // BLOCK continue@OUTER continue@INNER diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.kt.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.kt.txt index 2d4520661de..b2a30ce3ea6 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.kt.txt @@ -32,9 +32,9 @@ interface IReceiver { operator fun IntCell.next(): Int { return { // BLOCK - val : Int = .() - .( = .dec()) - + val tmp_0: Int = .() + .( = tmp_0.dec()) + tmp_0 } } @@ -42,9 +42,9 @@ interface IReceiver { fun IReceiver.test() { { // BLOCK - val : IntCell = (, FiveTimes).iterator() - while ((, ).hasNext()) { // BLOCK - val i: Int = (, ).next() + val tmp_1: IntCell = (, FiveTimes).iterator() + while ((, tmp_1).hasNext()) { // BLOCK + val i: Int = (, tmp_1).next() { // BLOCK println(message = i) } diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt index 1a10c981ba4..b48dae73df2 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt @@ -32,11 +32,11 @@ interface IReceiver { operator fun IntCell.next(): Int { return { // BLOCK - val tmp0_this: IntCell = + val tmp_0: IntCell = { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.dec()) - tmp1 + val tmp_1: Int = tmp_0.() + tmp_0.( = tmp_1.dec()) + tmp_1 } } } @@ -45,9 +45,9 @@ interface IReceiver { fun IReceiver.test() { { // BLOCK - val tmp0_iterator: IntCell = (, FiveTimes).iterator() - while ((, tmp0_iterator).hasNext()) { // BLOCK - val i: Int = (, tmp0_iterator).next() + val tmp_2: IntCell = (, FiveTimes).iterator() + while ((, tmp_2).hasNext()) { // BLOCK + val i: Int = (, tmp_2).next() { // BLOCK println(message = i) } diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt index d8f507a0cca..594f6875482 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.fir.kt.txt @@ -7,8 +7,8 @@ private operator fun J.component2(): Int { } fun test() { - val : @FlexibleNullability J? = j() - val a: Int = .component1() - val b: Int = /*!! J */.component2() + val tmp_0: @FlexibleNullability J? = j() + val a: Int = tmp_0.component1() + val b: Int = tmp_0 /*!! J */.component2() } diff --git a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt.txt b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt.txt index a2a57be3b15..d035e51e28d 100644 --- a/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt.txt +++ b/compiler/testData/ir/irText/expressions/implicitNotNullInDestructuringAssignment.kt.txt @@ -8,8 +8,8 @@ private operator fun J.component2(): Int { fun test() { // COMPOSITE { - val tmp0_container: @FlexibleNullability J? = j() - val a: Int = tmp0_container.component1() - val b: Int = tmp0_container /*!! J */.component2() + val tmp_0: @FlexibleNullability J? = j() + val a: Int = tmp_0.component1() + val b: Int = tmp_0 /*!! J */.component2() // } } diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.kt.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.kt.txt index c5442683495..5c92611b282 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.kt.txt @@ -64,14 +64,14 @@ fun testVarPrefix() { fun testVarPostfix() { var x: Int = 0 val x1: Int = { // BLOCK - val : Int = x - x = .inc() - + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } val x2: Int = { // BLOCK - val : Int = x - x = .dec() - + val tmp_1: Int = x + x = tmp_1.dec() + tmp_1 } } @@ -88,106 +88,106 @@ fun testPropPrefix() { fun testPropPostfix() { val p1: Int = { // BLOCK - val : Int = () - ( = .inc()) - + val tmp_2: Int = () + ( = tmp_2.inc()) + tmp_2 } val p2: Int = { // BLOCK - val : Int = () - ( = .dec()) - + val tmp_3: Int = () + ( = tmp_3.dec()) + tmp_3 } } fun testArrayPrefix() { val a1: Int = { // BLOCK - val : IntArray = () - val : Int = 0 - .set(index = , value = .get(index = ).inc()) - .get(index = ) + val tmp_4: IntArray = () + val tmp_5: Int = 0 + tmp_4.set(index = tmp_5, value = tmp_4.get(index = tmp_5).inc()) + tmp_4.get(index = tmp_5) } val a2: Int = { // BLOCK - val : IntArray = () - val : Int = 0 - .set(index = , value = .get(index = ).dec()) - .get(index = ) + val tmp_6: IntArray = () + val tmp_7: Int = 0 + tmp_6.set(index = tmp_7, value = tmp_6.get(index = tmp_7).dec()) + tmp_6.get(index = tmp_7) } } fun testArrayPostfix() { val a1: Int = { // BLOCK - val : IntArray = () - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .inc()) - + val tmp_8: IntArray = () + val tmp_9: Int = 0 + val tmp_10: Int = tmp_8.get(index = tmp_9) + tmp_8.set(index = tmp_9, value = tmp_10.inc()) + tmp_10 } val a2: Int = { // BLOCK - val : IntArray = () - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .dec()) - + val tmp_11: IntArray = () + val tmp_12: Int = 0 + val tmp_13: Int = tmp_11.get(index = tmp_12) + tmp_11.set(index = tmp_12, value = tmp_13.dec()) + tmp_13 } } fun testClassPropPrefix() { val p1: Int = { // BLOCK - val : C = C() - .( = .().inc()) - .() + val tmp_14: C = C() + tmp_14.( = tmp_14.().inc()) + tmp_14.() } val p2: Int = { // BLOCK - val : C = C() - .( = .().dec()) - .() + val tmp_15: C = C() + tmp_15.( = tmp_15.().dec()) + tmp_15.() } } fun testClassPropPostfix() { val p1: Int = { // BLOCK - val : C = C() - val : Int = .() - .( = .inc()) - + val tmp_16: C = C() + val tmp_17: Int = tmp_16.() + tmp_16.( = tmp_17.inc()) + tmp_17 } val p2: Int = { // BLOCK - val : C = C() - val : Int = .() - .( = .dec()) - + val tmp_18: C = C() + val tmp_19: Int = tmp_18.() + tmp_18.( = tmp_19.dec()) + tmp_19 } } fun testClassOperatorPrefix() { val a1: Int = { // BLOCK - val : C = C() - val : Int = 0 - .set(i = , value = .get(i = ).inc()) - .get(i = ) + val tmp_20: C = C() + val tmp_21: Int = 0 + tmp_20.set(i = tmp_21, value = tmp_20.get(i = tmp_21).inc()) + tmp_20.get(i = tmp_21) } val a2: Int = { // BLOCK - val : C = C() - val : Int = 0 - .set(i = , value = .get(i = ).dec()) - .get(i = ) + val tmp_22: C = C() + val tmp_23: Int = 0 + tmp_22.set(i = tmp_23, value = tmp_22.get(i = tmp_23).dec()) + tmp_22.get(i = tmp_23) } } fun testClassOperatorPostfix() { val a1: Int = { // BLOCK - val : C = C() - val : Int = 0 - val : Int = .get(i = ) - .set(i = , value = .inc()) - + val tmp_24: C = C() + val tmp_25: Int = 0 + val tmp_26: Int = tmp_24.get(i = tmp_25) + tmp_24.set(i = tmp_25, value = tmp_26.inc()) + tmp_26 } val a2: Int = { // BLOCK - val : C = C() - val : Int = 0 - val : Int = .get(i = ) - .set(i = , value = .dec()) - + val tmp_27: C = C() + val tmp_28: Int = 0 + val tmp_29: Int = tmp_27.get(i = tmp_28) + tmp_27.set(i = tmp_28, value = tmp_29.dec()) + tmp_29 } } @@ -204,45 +204,45 @@ fun testObjectPropPrefix() { fun testObjectPropPostfix() { val p1: Int = { // BLOCK - val : Int = O.() - O.( = .inc()) - + val tmp_30: Int = O.() + O.( = tmp_30.inc()) + tmp_30 } val p2: Int = { // BLOCK - val : Int = O.() - O.( = .dec()) - + val tmp_31: Int = O.() + O.( = tmp_31.dec()) + tmp_31 } } fun testObjectOperatorPrefix() { val a1: Int = { // BLOCK - val : O = O - val : Int = 0 - .set(i = , value = .get(i = ).inc()) - .get(i = ) + val tmp_32: O = O + val tmp_33: Int = 0 + tmp_32.set(i = tmp_33, value = tmp_32.get(i = tmp_33).inc()) + tmp_32.get(i = tmp_33) } val a2: Int = { // BLOCK - val : O = O - val : Int = 0 - .set(i = , value = .get(i = ).dec()) - .get(i = ) + val tmp_34: O = O + val tmp_35: Int = 0 + tmp_34.set(i = tmp_35, value = tmp_34.get(i = tmp_35).dec()) + tmp_34.get(i = tmp_35) } } fun testObjectOperatorPostfix() { val a1: Int = { // BLOCK - val : O = O - val : Int = 0 - val : Int = .get(i = ) - .set(i = , value = .inc()) - + val tmp_36: O = O + val tmp_37: Int = 0 + val tmp_38: Int = tmp_36.get(i = tmp_37) + tmp_36.set(i = tmp_37, value = tmp_38.inc()) + tmp_38 } val a2: Int = { // BLOCK - val : O = O - val : Int = 0 - val : Int = .get(i = ) - .set(i = , value = .dec()) - + val tmp_39: O = O + val tmp_40: Int = 0 + val tmp_41: Int = tmp_39.get(i = tmp_40) + tmp_39.set(i = tmp_40, value = tmp_41.dec()) + tmp_41 } } diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.kt.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.kt.txt index a3744afbaea..6816f0c791e 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.kt.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.kt.txt @@ -64,14 +64,14 @@ fun testVarPrefix() { fun testVarPostfix() { var x: Int = 0 val x1: Int = { // BLOCK - val tmp0: Int = x - x = tmp0.inc() - tmp0 + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } val x2: Int = { // BLOCK - val tmp1: Int = x - x = tmp1.dec() - tmp1 + val tmp_1: Int = x + x = tmp_1.dec() + tmp_1 } } @@ -93,184 +93,184 @@ fun testPropPrefix() { fun testPropPostfix() { val p1: Int = { // BLOCK { // BLOCK - val tmp0: Int = () - ( = tmp0.inc()) - tmp0 + val tmp_2: Int = () + ( = tmp_2.inc()) + tmp_2 } } val p2: Int = { // BLOCK { // BLOCK - val tmp1: Int = () - ( = tmp1.dec()) - tmp1 + val tmp_3: Int = () + ( = tmp_3.dec()) + tmp_3 } } } fun testArrayPrefix() { val a1: Int = { // BLOCK - val tmp0_array: IntArray = () - val tmp1_index0: Int = 0 - tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).inc()) - tmp0_array.get(index = tmp1_index0) + val tmp_4: IntArray = () + val tmp_5: Int = 0 + tmp_4.set(index = tmp_5, value = tmp_4.get(index = tmp_5).inc()) + tmp_4.get(index = tmp_5) } val a2: Int = { // BLOCK - val tmp2_array: IntArray = () - val tmp3_index0: Int = 0 - tmp2_array.set(index = tmp3_index0, value = tmp2_array.get(index = tmp3_index0).dec()) - tmp2_array.get(index = tmp3_index0) + val tmp_6: IntArray = () + val tmp_7: Int = 0 + tmp_6.set(index = tmp_7, value = tmp_6.get(index = tmp_7).dec()) + tmp_6.get(index = tmp_7) } } fun testArrayPostfix() { val a1: Int = { // BLOCK - val tmp0_array: IntArray = () - val tmp1_index0: Int = 0 - val tmp2: Int = tmp0_array.get(index = tmp1_index0) - tmp0_array.set(index = tmp1_index0, value = tmp2.inc()) - tmp2 + val tmp_8: IntArray = () + val tmp_9: Int = 0 + val tmp_10: Int = tmp_8.get(index = tmp_9) + tmp_8.set(index = tmp_9, value = tmp_10.inc()) + tmp_10 } val a2: Int = { // BLOCK - val tmp3_array: IntArray = () - val tmp4_index0: Int = 0 - val tmp5: Int = tmp3_array.get(index = tmp4_index0) - tmp3_array.set(index = tmp4_index0, value = tmp5.dec()) - tmp5 + val tmp_11: IntArray = () + val tmp_12: Int = 0 + val tmp_13: Int = tmp_11.get(index = tmp_12) + tmp_11.set(index = tmp_12, value = tmp_13.dec()) + tmp_13 } } fun testClassPropPrefix() { val p1: Int = { // BLOCK - val tmp0_this: C = C() + val tmp_14: C = C() { // BLOCK - tmp0_this.( = tmp0_this.().inc()) - tmp0_this.() + tmp_14.( = tmp_14.().inc()) + tmp_14.() } } val p2: Int = { // BLOCK - val tmp1_this: C = C() + val tmp_15: C = C() { // BLOCK - tmp1_this.( = tmp1_this.().dec()) - tmp1_this.() + tmp_15.( = tmp_15.().dec()) + tmp_15.() } } } fun testClassPropPostfix() { val p1: Int = { // BLOCK - val tmp0_this: C = C() + val tmp_16: C = C() { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_17: Int = tmp_16.() + tmp_16.( = tmp_17.inc()) + tmp_17 } } val p2: Int = { // BLOCK - val tmp2_this: C = C() + val tmp_18: C = C() { // BLOCK - val tmp3: Int = tmp2_this.() - tmp2_this.( = tmp3.dec()) - tmp3 + val tmp_19: Int = tmp_18.() + tmp_18.( = tmp_19.dec()) + tmp_19 } } } fun testClassOperatorPrefix() { val a1: Int = { // BLOCK - val tmp0_array: C = C() - val tmp1_index0: Int = 0 - tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc()) - tmp0_array.get(i = tmp1_index0) + val tmp_20: C = C() + val tmp_21: Int = 0 + tmp_20.set(i = tmp_21, value = tmp_20.get(i = tmp_21).inc()) + tmp_20.get(i = tmp_21) } val a2: Int = { // BLOCK - val tmp2_array: C = C() - val tmp3_index0: Int = 0 - tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec()) - tmp2_array.get(i = tmp3_index0) + val tmp_22: C = C() + val tmp_23: Int = 0 + tmp_22.set(i = tmp_23, value = tmp_22.get(i = tmp_23).dec()) + tmp_22.get(i = tmp_23) } } fun testClassOperatorPostfix() { val a1: Int = { // BLOCK - val tmp0_array: C = C() - val tmp1_index0: Int = 0 - val tmp2: Int = tmp0_array.get(i = tmp1_index0) - tmp0_array.set(i = tmp1_index0, value = tmp2.inc()) - tmp2 + val tmp_24: C = C() + val tmp_25: Int = 0 + val tmp_26: Int = tmp_24.get(i = tmp_25) + tmp_24.set(i = tmp_25, value = tmp_26.inc()) + tmp_26 } val a2: Int = { // BLOCK - val tmp3_array: C = C() - val tmp4_index0: Int = 0 - val tmp5: Int = tmp3_array.get(i = tmp4_index0) - tmp3_array.set(i = tmp4_index0, value = tmp5.dec()) - tmp5 + val tmp_27: C = C() + val tmp_28: Int = 0 + val tmp_29: Int = tmp_27.get(i = tmp_28) + tmp_27.set(i = tmp_28, value = tmp_29.dec()) + tmp_29 } } fun testObjectPropPrefix() { val p1: Int = { // BLOCK - val tmp0_this: O = O + val tmp_30: O = O { // BLOCK - tmp0_this.( = tmp0_this.().inc()) - tmp0_this.() + tmp_30.( = tmp_30.().inc()) + tmp_30.() } } val p2: Int = { // BLOCK - val tmp1_this: O = O + val tmp_31: O = O { // BLOCK - tmp1_this.( = tmp1_this.().dec()) - tmp1_this.() + tmp_31.( = tmp_31.().dec()) + tmp_31.() } } } fun testObjectPropPostfix() { val p1: Int = { // BLOCK - val tmp0_this: O = O + val tmp_32: O = O { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_33: Int = tmp_32.() + tmp_32.( = tmp_33.inc()) + tmp_33 } } val p2: Int = { // BLOCK - val tmp2_this: O = O + val tmp_34: O = O { // BLOCK - val tmp3: Int = tmp2_this.() - tmp2_this.( = tmp3.dec()) - tmp3 + val tmp_35: Int = tmp_34.() + tmp_34.( = tmp_35.dec()) + tmp_35 } } } fun testObjectOperatorPrefix() { val a1: Int = { // BLOCK - val tmp0_array: O = O - val tmp1_index0: Int = 0 - tmp0_array.set(i = tmp1_index0, value = tmp0_array.get(i = tmp1_index0).inc()) - tmp0_array.get(i = tmp1_index0) + val tmp_36: O = O + val tmp_37: Int = 0 + tmp_36.set(i = tmp_37, value = tmp_36.get(i = tmp_37).inc()) + tmp_36.get(i = tmp_37) } val a2: Int = { // BLOCK - val tmp2_array: O = O - val tmp3_index0: Int = 0 - tmp2_array.set(i = tmp3_index0, value = tmp2_array.get(i = tmp3_index0).dec()) - tmp2_array.get(i = tmp3_index0) + val tmp_38: O = O + val tmp_39: Int = 0 + tmp_38.set(i = tmp_39, value = tmp_38.get(i = tmp_39).dec()) + tmp_38.get(i = tmp_39) } } fun testObjectOperatorPostfix() { val a1: Int = { // BLOCK - val tmp0_array: O = O - val tmp1_index0: Int = 0 - val tmp2: Int = tmp0_array.get(i = tmp1_index0) - tmp0_array.set(i = tmp1_index0, value = tmp2.inc()) - tmp2 + val tmp_40: O = O + val tmp_41: Int = 0 + val tmp_42: Int = tmp_40.get(i = tmp_41) + tmp_40.set(i = tmp_41, value = tmp_42.inc()) + tmp_42 } val a2: Int = { // BLOCK - val tmp3_array: O = O - val tmp4_index0: Int = 0 - val tmp5: Int = tmp3_array.get(i = tmp4_index0) - tmp3_array.set(i = tmp4_index0, value = tmp5.dec()) - tmp5 + val tmp_43: O = O + val tmp_44: Int = 0 + val tmp_45: Int = tmp_43.get(i = tmp_44) + tmp_43.set(i = tmp_44, value = tmp_45.dec()) + tmp_45 } } diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt index 687463ac4a4..20bcae462ed 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.kt.txt @@ -2,13 +2,13 @@ fun test(j: J) { j.getFoo() /*~> Unit */ j.setFoo(x = 1) { // BLOCK - val : J = j - val : Int = .getFoo() - .setFoo(x = .inc()) - + val tmp_0: J = j + val tmp_1: Int = tmp_0.getFoo() + tmp_0.setFoo(x = tmp_1.inc()) + tmp_1 } /*~> Unit */ { // BLOCK - val : J = j - .setFoo(x = .getFoo().plus(other = 1)) + val tmp_2: J = j + tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt index 9551f5faaf1..cd4621de914 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.kt.txt @@ -2,15 +2,15 @@ fun test(j: J) { j.getFoo() /*~> Unit */ j.setFoo(x = 1) { // BLOCK - val tmp0_receiver: J = j + val tmp_0: J = j { // BLOCK - val tmp1: Int = tmp0_receiver.getFoo() - tmp0_receiver.setFoo(x = tmp1.inc()) - tmp1 + val tmp_1: Int = tmp_0.getFoo() + tmp_0.setFoo(x = tmp_1.inc()) + tmp_1 } } /*~> Unit */ { // BLOCK - val tmp2_receiver: J = j - tmp2_receiver.setFoo(x = tmp2_receiver.getFoo().plus(other = 1)) + val tmp_2: J = j + tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt index e6285acbc8a..b07ad9d6d54 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.kt.txt @@ -2,13 +2,13 @@ fun test(j: J) { j.getFoo() /*~> Unit */ j.setFoo(x = 1) { // BLOCK - val : J = j - val : Int = .getFoo() - .setFoo(x = .inc()) - + val tmp_0: J = j + val tmp_1: Int = tmp_0.getFoo() + tmp_0.setFoo(x = tmp_1.inc()) + tmp_1 } /*~> Unit */ { // BLOCK - val : J = j - .setFoo(x = .getFoo().plus(other = 1)) + val tmp_2: J = j + tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt.txt index 402364bd355..f936c55bebb 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.kt.txt @@ -2,15 +2,15 @@ fun test(j: J) { j.getFoo() /*~> Unit */ j.setFoo(x = 1) { // BLOCK - val tmp0_receiver: J = j + val tmp_0: J = j { // BLOCK - val tmp1: Int = tmp0_receiver.getFoo() - tmp0_receiver.setFoo(x = tmp1.inc()) - tmp1 + val tmp_1: Int = tmp_0.getFoo() + tmp_0.setFoo(x = tmp_1.inc()) + tmp_1 } } /*~> Unit */ { // BLOCK - val tmp2_receiver: J = j - tmp2_receiver.setFoo(x = tmp2_receiver.getFoo().plus(other = 1)) + val tmp_2: J = j + tmp_2.setFoo(x = tmp_2.getFoo().plus(other = 1)) } } diff --git a/compiler/testData/ir/irText/expressions/kt16904.kt.txt b/compiler/testData/ir/irText/expressions/kt16904.kt.txt index 47b075f4de3..7006a58cc45 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.kt.txt @@ -34,12 +34,12 @@ class Test1 : A { /* () */ { // BLOCK - val tmp0_this: Test1 = - tmp0_this.().plusAssign(x = 42) + val tmp_0: Test1 = + tmp_0.().plusAssign(x = 42) } { // BLOCK - val tmp1_this: Test1 = - tmp1_this.( = tmp1_this.().plus(other = 42)) + val tmp_1: Test1 = + tmp_1.( = tmp_1.().plus(other = 42)) } } diff --git a/compiler/testData/ir/irText/expressions/kt28456.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt28456.fir.kt.txt index e8bb7ed87bb..a7b91dde441 100644 --- a/compiler/testData/ir/irText/expressions/kt28456.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt28456.fir.kt.txt @@ -20,20 +20,20 @@ fun testSimpleAssignment(a: A) { fun testPostfixIncrement(a: A): Int { return { // BLOCK - val : A = a - val : Int = 1 - val : Int = 2 - val : Int = .get(xs = [, ]) - .set(i = , j = , v = .inc()) - + val tmp_0: A = a + val tmp_1: Int = 1 + val tmp_2: Int = 2 + val tmp_3: Int = tmp_0.get(xs = [tmp_1, tmp_2]) + tmp_0.set(i = tmp_1, j = tmp_2, v = tmp_3.inc()) + tmp_3 } } fun testCompoundAssignment(a: A) { { // BLOCK - val : A = a - val : Int = 1 - val : Int = 2 - .set(i = , j = , v = .get(xs = [, ]).plus(other = 10)) + val tmp_4: A = a + val tmp_5: Int = 1 + val tmp_6: Int = 2 + tmp_4.set(i = tmp_5, j = tmp_6, v = tmp_4.get(xs = [tmp_5, tmp_6]).plus(other = 10)) } } diff --git a/compiler/testData/ir/irText/expressions/kt28456.kt.txt b/compiler/testData/ir/irText/expressions/kt28456.kt.txt index dc13521ec62..a7b91dde441 100644 --- a/compiler/testData/ir/irText/expressions/kt28456.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt28456.kt.txt @@ -20,20 +20,20 @@ fun testSimpleAssignment(a: A) { fun testPostfixIncrement(a: A): Int { return { // BLOCK - val tmp0_array: A = a - val tmp1_index0: Int = 1 - val tmp2_index1: Int = 2 - val tmp3: Int = tmp0_array.get(xs = [tmp1_index0, tmp2_index1]) - tmp0_array.set(i = tmp1_index0, j = tmp2_index1, v = tmp3.inc()) - tmp3 + val tmp_0: A = a + val tmp_1: Int = 1 + val tmp_2: Int = 2 + val tmp_3: Int = tmp_0.get(xs = [tmp_1, tmp_2]) + tmp_0.set(i = tmp_1, j = tmp_2, v = tmp_3.inc()) + tmp_3 } } fun testCompoundAssignment(a: A) { { // BLOCK - val tmp0_array: A = a - val tmp1_index0: Int = 1 - val tmp2_index1: Int = 2 - tmp0_array.set(i = tmp1_index0, j = tmp2_index1, v = tmp0_array.get(xs = [tmp1_index0, tmp2_index1]).plus(other = 10)) + val tmp_4: A = a + val tmp_5: Int = 1 + val tmp_6: Int = 2 + tmp_4.set(i = tmp_5, j = tmp_6, v = tmp_4.get(xs = [tmp_5, tmp_6]).plus(other = 10)) } } diff --git a/compiler/testData/ir/irText/expressions/kt28456b.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt28456b.fir.kt.txt index dfa31d44932..e865e5669da 100644 --- a/compiler/testData/ir/irText/expressions/kt28456b.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt28456b.fir.kt.txt @@ -20,18 +20,18 @@ fun testSimpleAssignment(a: A) { fun testPostfixIncrement(a: A): Int { return { // BLOCK - val : A = a - val : Int = 1 - val : Int = .get(i = ) - .set(i = , v = .inc()) - + val tmp_0: A = a + val tmp_1: Int = 1 + val tmp_2: Int = tmp_0.get(i = tmp_1) + tmp_0.set(i = tmp_1, v = tmp_2.inc()) + tmp_2 } } fun testCompoundAssignment(a: A) { { // BLOCK - val : A = a - val : Int = 1 - .set(i = , v = .get(i = ).plus(other = 10)) + val tmp_3: A = a + val tmp_4: Int = 1 + tmp_3.set(i = tmp_4, v = tmp_3.get(i = tmp_4).plus(other = 10)) } } diff --git a/compiler/testData/ir/irText/expressions/kt28456b.kt.txt b/compiler/testData/ir/irText/expressions/kt28456b.kt.txt index c414df201df..e865e5669da 100644 --- a/compiler/testData/ir/irText/expressions/kt28456b.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt28456b.kt.txt @@ -20,18 +20,18 @@ fun testSimpleAssignment(a: A) { fun testPostfixIncrement(a: A): Int { return { // BLOCK - val tmp0_array: A = a - val tmp1_index0: Int = 1 - val tmp2: Int = tmp0_array.get(i = tmp1_index0) - tmp0_array.set(i = tmp1_index0, v = tmp2.inc()) - tmp2 + val tmp_0: A = a + val tmp_1: Int = 1 + val tmp_2: Int = tmp_0.get(i = tmp_1) + tmp_0.set(i = tmp_1, v = tmp_2.inc()) + tmp_2 } } fun testCompoundAssignment(a: A) { { // BLOCK - val tmp0_array: A = a - val tmp1_index0: Int = 1 - tmp0_array.set(i = tmp1_index0, v = tmp0_array.get(i = tmp1_index0).plus(other = 10)) + val tmp_3: A = a + val tmp_4: Int = 1 + tmp_3.set(i = tmp_4, v = tmp_3.get(i = tmp_4).plus(other = 10)) } } diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.kt.txt index fd3b77edb9d..3d530641df2 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.kt.txt @@ -12,17 +12,17 @@ fun test(x: X, nx: X?) { x.() as MutableList.plusAssign(element = 3) x.f() as MutableList.plusAssign(element = 4) CHECK_NOT_NULL>(arg0 = { // BLOCK - val tmp0_safe_receiver: X? = nx + val tmp_0: X? = nx when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } }).plusAssign(element = 5) CHECK_NOT_NULL>(arg0 = { // BLOCK - val tmp1_safe_receiver: X? = nx + val tmp_1: X? = nx when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.f() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.f() } }).plusAssign(element = 6) } diff --git a/compiler/testData/ir/irText/expressions/kt30020.kt.txt b/compiler/testData/ir/irText/expressions/kt30020.kt.txt index acaecd37245..4cfa276ed19 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.kt.txt @@ -8,24 +8,24 @@ interface X { fun test(x: X, nx: X?) { { // BLOCK - val tmp0_this: X = x - tmp0_this.().plusAssign(element = 1) + val tmp_0: X = x + tmp_0.().plusAssign(element = 1) } x.f().plusAssign(element = 2) x.() as MutableList.plusAssign(element = 3) x.f() as MutableList.plusAssign(element = 4) CHECK_NOT_NULL>(arg0 = { // BLOCK - val tmp1_safe_receiver: X? = nx + val tmp_1: X? = nx when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.() } }).plusAssign(element = 5) CHECK_NOT_NULL>(arg0 = { // BLOCK - val tmp2_safe_receiver: X? = nx + val tmp_2: X? = nx when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.f() + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.f() } }).plusAssign(element = 6) } diff --git a/compiler/testData/ir/irText/expressions/kt30796.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt30796.fir.kt.txt index 78a860220e9..4fa7d1053c0 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.fir.kt.txt @@ -4,82 +4,82 @@ fun magic(): T { fun test(value: T, value2: T) { val x1: Any = { // BLOCK - val : T = value + val tmp_0: T = value when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_0, arg1 = null) -> 42 + else -> tmp_0 } } val x2: Any = { // BLOCK - val : T = value + val tmp_1: T = value when { - EQEQ(arg0 = , arg1 = null) -> { // BLOCK - val : T = value2 + EQEQ(arg0 = tmp_1, arg1 = null) -> { // BLOCK + val tmp_2: T = value2 when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_2, arg1 = null) -> 42 + else -> tmp_2 } } - else -> + else -> tmp_1 } } val x3: Any = { // BLOCK - val : Any? = { // BLOCK - val : T = value + val tmp_3: Any? = { // BLOCK + val tmp_4: T = value when { - EQEQ(arg0 = , arg1 = null) -> value2 - else -> + EQEQ(arg0 = tmp_4, arg1 = null) -> value2 + else -> tmp_4 } } when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_3, arg1 = null) -> 42 + else -> tmp_3 } } val x4: Any = { // BLOCK - val : Any? = { // BLOCK - val : T = value + val tmp_5: Any? = { // BLOCK + val tmp_6: T = value when { - EQEQ(arg0 = , arg1 = null) -> value2 - else -> + EQEQ(arg0 = tmp_6, arg1 = null) -> value2 + else -> tmp_6 } } when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_5, arg1 = null) -> 42 + else -> tmp_5 } } val x5: Any = { // BLOCK - val : Any? = magic() + val tmp_7: Any? = magic() when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_7, arg1 = null) -> 42 + else -> tmp_7 } } val x6: Any = { // BLOCK - val : Any? = { // BLOCK - val : T = value + val tmp_8: Any? = { // BLOCK + val tmp_9: T = value when { - EQEQ(arg0 = , arg1 = null) -> magic() - else -> + EQEQ(arg0 = tmp_9, arg1 = null) -> magic() + else -> tmp_9 } } when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_8, arg1 = null) -> 42 + else -> tmp_8 } } val x7: Any = { // BLOCK - val : Any? = { // BLOCK - val : Any? = magic() + val tmp_10: Any? = { // BLOCK + val tmp_11: Any? = magic() when { - EQEQ(arg0 = , arg1 = null) -> value - else -> + EQEQ(arg0 = tmp_11, arg1 = null) -> value + else -> tmp_11 } } when { - EQEQ(arg0 = , arg1 = null) -> 42 - else -> + EQEQ(arg0 = tmp_10, arg1 = null) -> 42 + else -> tmp_10 } } } diff --git a/compiler/testData/ir/irText/expressions/kt30796.kt.txt b/compiler/testData/ir/irText/expressions/kt30796.kt.txt index 63d232c16a4..4fa56032dcc 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.kt.txt @@ -4,82 +4,82 @@ fun magic(): T { fun test(value: T, value2: T) { val x1: Any = { // BLOCK - val tmp0_elvis_lhs: T = value + val tmp_0: T = value when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> 42 - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> 42 + else -> tmp_0 } } val x2: Any = { // BLOCK - val tmp2_elvis_lhs: T = value + val tmp_1: T = value when { - EQEQ(arg0 = tmp2_elvis_lhs, arg1 = null) -> { // BLOCK - val tmp1_elvis_lhs: T = value2 + EQEQ(arg0 = tmp_1, arg1 = null) -> { // BLOCK + val tmp_2: T = value2 when { - EQEQ(arg0 = tmp1_elvis_lhs, arg1 = null) -> 42 - else -> tmp1_elvis_lhs + EQEQ(arg0 = tmp_2, arg1 = null) -> 42 + else -> tmp_2 } } - else -> tmp2_elvis_lhs + else -> tmp_1 } } val x3: Any = { // BLOCK - val tmp4_elvis_lhs: T = { // BLOCK - val tmp3_elvis_lhs: T = value + val tmp_3: T = { // BLOCK + val tmp_4: T = value when { - EQEQ(arg0 = tmp3_elvis_lhs, arg1 = null) -> value2 - else -> tmp3_elvis_lhs + EQEQ(arg0 = tmp_4, arg1 = null) -> value2 + else -> tmp_4 } } when { - EQEQ(arg0 = tmp4_elvis_lhs, arg1 = null) -> 42 - else -> tmp4_elvis_lhs + EQEQ(arg0 = tmp_3, arg1 = null) -> 42 + else -> tmp_3 } } val x4: Any = { // BLOCK - val tmp6_elvis_lhs: T = { // BLOCK - val tmp5_elvis_lhs: T = value + val tmp_5: T = { // BLOCK + val tmp_6: T = value when { - EQEQ(arg0 = tmp5_elvis_lhs, arg1 = null) -> value2 - else -> tmp5_elvis_lhs + EQEQ(arg0 = tmp_6, arg1 = null) -> value2 + else -> tmp_6 } } when { - EQEQ(arg0 = tmp6_elvis_lhs, arg1 = null) -> 42 - else -> tmp6_elvis_lhs + EQEQ(arg0 = tmp_5, arg1 = null) -> 42 + else -> tmp_5 } } val x5: Any = { // BLOCK - val tmp7_elvis_lhs: Any? = magic() + val tmp_7: Any? = magic() when { - EQEQ(arg0 = tmp7_elvis_lhs, arg1 = null) -> 42 - else -> tmp7_elvis_lhs + EQEQ(arg0 = tmp_7, arg1 = null) -> 42 + else -> tmp_7 } } val x6: Any = { // BLOCK - val tmp9_elvis_lhs: Any? = { // BLOCK - val tmp8_elvis_lhs: T = value + val tmp_8: Any? = { // BLOCK + val tmp_9: T = value when { - EQEQ(arg0 = tmp8_elvis_lhs, arg1 = null) -> magic() - else -> tmp8_elvis_lhs + EQEQ(arg0 = tmp_9, arg1 = null) -> magic() + else -> tmp_9 } } when { - EQEQ(arg0 = tmp9_elvis_lhs, arg1 = null) -> 42 - else -> tmp9_elvis_lhs + EQEQ(arg0 = tmp_8, arg1 = null) -> 42 + else -> tmp_8 } } val x7: Any = { // BLOCK - val tmp11_elvis_lhs: Any? = { // BLOCK - val tmp10_elvis_lhs: Any? = magic() + val tmp_10: Any? = { // BLOCK + val tmp_11: Any? = magic() when { - EQEQ(arg0 = tmp10_elvis_lhs, arg1 = null) -> value - else -> tmp10_elvis_lhs + EQEQ(arg0 = tmp_11, arg1 = null) -> value + else -> tmp_11 } } when { - EQEQ(arg0 = tmp11_elvis_lhs, arg1 = null) -> 42 - else -> tmp11_elvis_lhs + EQEQ(arg0 = tmp_10, arg1 = null) -> 42 + else -> tmp_10 } } } diff --git a/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt index 4c84df502e4..3e92394811d 100644 --- a/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt @@ -24,10 +24,10 @@ val aFloat: A val aInt: Float field = { // BLOCK - val : A = () - val : Int = 1 - val : Float = .get(i = ) - .set(i = , v = .dec()) - + val tmp_0: A = () + val tmp_1: Int = 1 + val tmp_2: Float = tmp_0.get(i = tmp_1) + tmp_0.set(i = tmp_1, v = tmp_2.dec()) + tmp_2 } get diff --git a/compiler/testData/ir/irText/expressions/kt36956.kt.txt b/compiler/testData/ir/irText/expressions/kt36956.kt.txt index 54fdea2a023..3e92394811d 100644 --- a/compiler/testData/ir/irText/expressions/kt36956.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt36956.kt.txt @@ -24,10 +24,10 @@ val aFloat: A val aInt: Float field = { // BLOCK - val tmp0_array: A = () - val tmp1_index0: Int = 1 - val tmp2: Float = tmp0_array.get(i = tmp1_index0) - tmp0_array.set(i = tmp1_index0, v = tmp2.dec()) - tmp2 + val tmp_0: A = () + val tmp_1: Int = 1 + val tmp_2: Float = tmp_0.get(i = tmp_1) + tmp_0.set(i = tmp_1, v = tmp_2.dec()) + tmp_2 } get diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt index 007411d4ab7..9e90bc1a1fd 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.kt.txt @@ -17,22 +17,22 @@ fun test1(a: Any) { fun test2(a: Any) { { // BLOCK - val : Any = a - val : Function0 = local fun () { + val tmp_0: Any = a + val tmp_1: Function0 = local fun () { return Unit } - .set(index = , value = .get(index = ).plus(other = 42)) + tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42)) } } fun test3(a: Any) { - val : Any = a - val : Function0 = local fun () { + val tmp_2: Any = a + val tmp_3: Function0 = local fun () { return Unit } - val : Int = .get(index = ) - .set(index = , value = .inc()) - /*~> Unit */ + val tmp_4: Int = tmp_2.get(index = tmp_3) + tmp_2.set(index = tmp_3, value = tmp_4.inc()) + tmp_4 /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt index f57dd1934b7..a255b0ebe90 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.kt.txt @@ -17,24 +17,24 @@ fun test1(a: Any) { fun test2(a: Any) { { // BLOCK - val tmp0_array: Any = a - val tmp1_index0: Function0 = local fun () { + val tmp_0: Any = a + val tmp_1: Function0 = local fun () { return Unit } - tmp0_array.set(index = tmp1_index0, value = tmp0_array.get(index = tmp1_index0).plus(other = 42)) + tmp_0.set(index = tmp_1, value = tmp_0.get(index = tmp_1).plus(other = 42)) } } fun test3(a: Any) { { // BLOCK - val tmp0_array: Any = a - val tmp1_index0: Function0 = local fun () { + val tmp_2: Any = a + val tmp_3: Function0 = local fun () { return Unit } - val tmp2: Int = tmp0_array.get(index = tmp1_index0) - tmp0_array.set(index = tmp1_index0, value = tmp2.inc()) - tmp2 + val tmp_4: Int = tmp_2.get(index = tmp_3) + tmp_2.set(index = tmp_3, value = tmp_4.inc()) + tmp_4 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/multipleSmartCasts.fir.kt.txt b/compiler/testData/ir/irText/expressions/multipleSmartCasts.fir.kt.txt index b583cac2401..e7aaf6e653b 100644 --- a/compiler/testData/ir/irText/expressions/multipleSmartCasts.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/multipleSmartCasts.fir.kt.txt @@ -14,9 +14,9 @@ fun test(x: Any) { x is IC1 -> x /*as IC1 */ is IC2 else -> false } -> { // BLOCK - val : Any = x /*as IC1 */ - val x1: Int = /*as IC1 */.component1() - val x2: String = /*as IC1 */ /*as IC2 */.component2() + val tmp_0: Any = x /*as IC1 */ + val x1: Int = tmp_0 /*as IC1 */.component1() + val x2: String = tmp_0 /*as IC1 */ /*as IC2 */.component2() } } } diff --git a/compiler/testData/ir/irText/expressions/multipleSmartCasts.kt.txt b/compiler/testData/ir/irText/expressions/multipleSmartCasts.kt.txt index ca4c7ca8d04..1981c1028b1 100644 --- a/compiler/testData/ir/irText/expressions/multipleSmartCasts.kt.txt +++ b/compiler/testData/ir/irText/expressions/multipleSmartCasts.kt.txt @@ -15,9 +15,9 @@ fun test(x: Any) { else -> false } -> { // BLOCK // COMPOSITE { - val tmp0_container: Any = x - val x1: Int = tmp0_container /*as IC1 */.component1() - val x2: String = tmp0_container /*as IC2 */.component2() + val tmp_0: Any = x + val x1: Int = tmp_0 /*as IC1 */.component1() + val x2: String = tmp_0 /*as IC2 */.component2() // } } } diff --git a/compiler/testData/ir/irText/expressions/safeAssignment.fir.kt.txt b/compiler/testData/ir/irText/expressions/safeAssignment.fir.kt.txt index a44b20dfee8..d58bda466fc 100644 --- a/compiler/testData/ir/irText/expressions/safeAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeAssignment.fir.kt.txt @@ -14,10 +14,10 @@ class C { fun test(nc: C?) { { // BLOCK - val tmp0_safe_receiver: C? = nc + val tmp_0: C? = nc when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.( = 42) + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.( = 42) } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/safeAssignment.kt.txt b/compiler/testData/ir/irText/expressions/safeAssignment.kt.txt index 6c2a1055e23..2fdb9a8ff67 100644 --- a/compiler/testData/ir/irText/expressions/safeAssignment.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeAssignment.kt.txt @@ -14,10 +14,10 @@ class C { fun test(nc: C?) { { // BLOCK - val tmp0_safe_receiver: C? = nc + val tmp_0: C? = nc when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp0_safe_receiver.( = 42) + EQEQ(arg0 = tmp_0, arg1 = null) -> null /*~> Unit */ + else -> tmp_0.( = 42) } } } diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt index e1d287f4ef8..af02823bf98 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.kt.txt @@ -18,10 +18,10 @@ var C?.p: Int operator fun Int?.inc(): Int? { return { // BLOCK - val tmp0_safe_receiver: Int? = + val tmp_0: Int? = when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.inc() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.inc() } } } @@ -35,14 +35,14 @@ operator fun Int?.set(index: Int, value: Int) { fun testProperty(nc: C?) { { // BLOCK - val tmp1_safe_receiver: C? = nc + val tmp_1: C? = nc when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null + EQEQ(arg0 = tmp_1, arg1 = null) -> null else -> { // BLOCK - val : C = tmp1_safe_receiver - val : Int = .() - .(value = .inc()) - + val tmp_2: C = tmp_1 + val tmp_3: Int = tmp_2.() + tmp_2.(value = tmp_3.inc()) + tmp_3 } } } /*~> Unit */ @@ -50,15 +50,15 @@ fun testProperty(nc: C?) { fun testArrayAccess(nc: C?) { { // BLOCK - val tmp2_safe_receiver: C? = nc + val tmp_4: C? = nc when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null + EQEQ(arg0 = tmp_4, arg1 = null) -> null else -> { // BLOCK - val : Int = tmp2_safe_receiver.() - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .inc()) - + val tmp_5: Int = tmp_4.() + val tmp_6: Int = 0 + val tmp_7: Int = tmp_5.get(index = tmp_6) + tmp_5.set(index = tmp_6, value = tmp_7.inc()) + tmp_7 } } } /*~> Unit */ diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt.txt index 1400a80bfbf..5efca1ae3d7 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.kt.txt @@ -18,10 +18,10 @@ var C?.p: Int operator fun Int?.inc(): Int? { return { // BLOCK - val tmp0_safe_receiver: Int? = + val tmp_0: Int? = when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.inc() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.inc() } } } @@ -35,15 +35,15 @@ operator fun Int?.set(index: Int, value: Int) { fun testProperty(nc: C?) { { // BLOCK - val tmp0_safe_receiver: C? = nc + val tmp_1: C? = nc when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null + EQEQ(arg0 = tmp_1, arg1 = null) -> null else -> { // BLOCK - val tmp1_receiver: C? = tmp0_safe_receiver + val tmp_2: C? = tmp_1 { // BLOCK - val tmp2: Int = tmp1_receiver.() - tmp1_receiver.(value = tmp2.inc()) - tmp2 + val tmp_3: Int = tmp_2.() + tmp_2.(value = tmp_3.inc()) + tmp_3 } } } @@ -52,16 +52,16 @@ fun testProperty(nc: C?) { fun testArrayAccess(nc: C?) { { // BLOCK - val tmp1_array: Int? = { // BLOCK - val tmp0_safe_receiver: C? = nc + val tmp_4: Int? = { // BLOCK + val tmp_5: C? = nc when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_5, arg1 = null) -> null + else -> tmp_5.() } } - val tmp2_index0: Int = 0 - val tmp3: Int = tmp1_array.get(index = tmp2_index0) - tmp1_array.set(index = tmp2_index0, value = tmp3.inc()) - tmp3 + val tmp_6: Int = 0 + val tmp_7: Int = tmp_4.get(index = tmp_6) + tmp_4.set(index = tmp_6, value = tmp_7.inc()) + tmp_7 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/safeCalls.fir.kt.txt b/compiler/testData/ir/irText/expressions/safeCalls.fir.kt.txt index 9805859fa15..b6c9bddefc5 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.fir.kt.txt @@ -21,50 +21,50 @@ interface IHost { fun test1(x: String?): Int? { return { // BLOCK - val tmp0_safe_receiver: String? = x + val tmp_0: String? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } } } fun test2(x: String?): Int? { return { // BLOCK - val tmp1_safe_receiver: String? = x + val tmp_1: String? = x when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.hashCode() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.hashCode() } } } fun test3(x: String?, y: Any?): Boolean? { return { // BLOCK - val tmp2_safe_receiver: String? = x + val tmp_2: String? = x when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.equals(other = y) + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.equals(other = y) } } } fun test4(x: Ref?) { { // BLOCK - val tmp3_safe_receiver: Ref? = x + val tmp_3: Ref? = x when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null - else -> tmp3_safe_receiver.( = 0) + EQEQ(arg0 = tmp_3, arg1 = null) -> null + else -> tmp_3.( = 0) } } /*~> Unit */ } fun IHost.test5(s: String?): Int? { return { // BLOCK - val tmp4_safe_receiver: String? = s + val tmp_4: String? = s when { - EQEQ(arg0 = tmp4_safe_receiver, arg1 = null) -> null - else -> (, tmp4_safe_receiver).extLength() + EQEQ(arg0 = tmp_4, arg1 = null) -> null + else -> (, tmp_4).extLength() } } } @@ -75,10 +75,10 @@ fun Int.foo(): Int { fun box() { { // BLOCK - val tmp5_safe_receiver: Int = 42 + val tmp_5: Int = 42 when { - EQEQ(arg0 = tmp5_safe_receiver, arg1 = null) -> null - else -> tmp5_safe_receiver.foo() + EQEQ(arg0 = tmp_5, arg1 = null) -> null + else -> tmp_5.foo() } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/safeCalls.kt.txt b/compiler/testData/ir/irText/expressions/safeCalls.kt.txt index a9d3613f3ee..aefcb4e03d5 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.kt.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.kt.txt @@ -21,50 +21,50 @@ interface IHost { fun test1(x: String?): Int? { return { // BLOCK - val tmp0_safe_receiver: String? = x + val tmp_0: String? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } } } fun test2(x: String?): Int? { return { // BLOCK - val tmp0_safe_receiver: String? = x + val tmp_1: String? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.hashCode() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.hashCode() } } } fun test3(x: String?, y: Any?): Boolean? { return { // BLOCK - val tmp0_safe_receiver: String? = x + val tmp_2: String? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.equals(other = y) + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.equals(other = y) } } } fun test4(x: Ref?) { { // BLOCK - val tmp0_safe_receiver: Ref? = x + val tmp_3: Ref? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp0_safe_receiver.( = 0) + EQEQ(arg0 = tmp_3, arg1 = null) -> null /*~> Unit */ + else -> tmp_3.( = 0) } } } fun IHost.test5(s: String?): Int? { return { // BLOCK - val tmp0_safe_receiver: String? = s + val tmp_4: String? = s when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> (, tmp0_safe_receiver).extLength() + EQEQ(arg0 = tmp_4, arg1 = null) -> null + else -> (, tmp_4).extLength() } } } @@ -75,10 +75,10 @@ fun Int.foo(): Int { fun box() { { // BLOCK - val tmp0_safe_receiver: Int = 42 + val tmp_5: Int = 42 when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.foo() + EQEQ(arg0 = tmp_5, arg1 = null) -> null + else -> tmp_5.foo() } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.kt.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.kt.txt index 1255fb8d0c4..cc5c3721f59 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.kt.txt @@ -18,7 +18,7 @@ fun test(x: I1) { when { x !is I2 -> return Unit } - val : I1 = x /*as I2 */ - val c1: Int = /*as I2 */.component1() - val c2: String = /*as I2 */.component2() + val tmp_0: I1 = x /*as I2 */ + val c1: Int = tmp_0 /*as I2 */.component1() + val c2: String = tmp_0 /*as I2 */.component2() } diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt.txt index 72da10ee35a..b1a9c111927 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.kt.txt @@ -19,8 +19,8 @@ fun test(x: I1) { x !is I2 -> return Unit } // COMPOSITE { - val tmp0_container: I2 = x /*as I2 */ - val c1: Int = tmp0_container /*as I1 */.component1() - val c2: String = tmp0_container.component2() + val tmp_0: I2 = x /*as I2 */ + val c1: Int = tmp_0 /*as I1 */.component1() + val c2: String = tmp_0.component2() // } } diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.kt.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.kt.txt index 6785e3e41a2..14bd40e8824 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.kt.txt @@ -14,10 +14,10 @@ enum class En : Enum { get ENTRY = En(x = { // BLOCK - val tmp0_safe_receiver: Any? = () + val tmp_0: Any? = () when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toString() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toString() } }) diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt.txt index 07fc4d04ed3..bae88378012 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.kt.txt @@ -14,10 +14,10 @@ enum class En : Enum { get ENTRY = En(x = { // BLOCK - val tmp0_safe_receiver: Any? = () + val tmp_0: Any? = () when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toString() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toString() } }) diff --git a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt.txt b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt.txt index b5161ea7d1e..322b85f5439 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInInitBlock.kt.txt @@ -10,10 +10,10 @@ class C { init { .#s = { // BLOCK - val tmp0_safe_receiver: Any? = x + val tmp_0: Any? = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toString() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toString() } } } diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.kt.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.kt.txt index d26d3800122..7bb9635995c 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.fir.kt.txt @@ -19,16 +19,16 @@ fun test3(): String { fun test4(ns: String?): String? { return { // BLOCK - val tmp1_safe_receiver: Function0? = { // BLOCK - val tmp0_safe_receiver: String? = ns + val tmp_0: Function0? = { // BLOCK + val tmp_1: String? = ns when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.k() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.k() } } when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.invoke() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.invoke() } } } diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt index d26d3800122..7bb9635995c 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.kt.txt @@ -19,16 +19,16 @@ fun test3(): String { fun test4(ns: String?): String? { return { // BLOCK - val tmp1_safe_receiver: Function0? = { // BLOCK - val tmp0_safe_receiver: String? = ns + val tmp_0: Function0? = { // BLOCK + val tmp_1: String? = ns when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.k() + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.k() } } when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.invoke() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.invoke() } } } diff --git a/compiler/testData/ir/irText/expressions/when.fir.kt.txt b/compiler/testData/ir/irText/expressions/when.fir.kt.txt index 76ec1fb96c5..53a8d9cb025 100644 --- a/compiler/testData/ir/irText/expressions/when.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/when.fir.kt.txt @@ -9,13 +9,13 @@ object A { fun testWithSubject(x: Any?): String { return { // BLOCK - val tmp0_subject: Any? = x + val tmp_0: Any? = x when { - EQEQ(arg0 = tmp0_subject, arg1 = null) -> "null" - EQEQ(arg0 = tmp0_subject, arg1 = A) -> "A" - tmp0_subject is String -> "String" - tmp0_subject !is Number -> "!Number" - setOf().contains(element = tmp0_subject /*as Number */) -> "nothingness?" + EQEQ(arg0 = tmp_0, arg1 = null) -> "null" + EQEQ(arg0 = tmp_0, arg1 = A) -> "A" + tmp_0 is String -> "String" + tmp_0 !is Number -> "!Number" + setOf().contains(element = tmp_0 /*as Number */) -> "nothingness?" else -> "something" } } @@ -34,28 +34,28 @@ fun test(x: Any?): String { fun testComma(x: Int): String { return { // BLOCK - val tmp1_subject: Int = x + val tmp_1: Int = x when { when { when { - EQEQ(arg0 = tmp1_subject, arg1 = 1) -> true - else -> EQEQ(arg0 = tmp1_subject, arg1 = 2) + EQEQ(arg0 = tmp_1, arg1 = 1) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 2) } -> true else -> when { - EQEQ(arg0 = tmp1_subject, arg1 = 3) -> true - else -> EQEQ(arg0 = tmp1_subject, arg1 = 4) + EQEQ(arg0 = tmp_1, arg1 = 3) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 4) } } -> "1234" when { - EQEQ(arg0 = tmp1_subject, arg1 = 5) -> true + EQEQ(arg0 = tmp_1, arg1 = 5) -> true else -> when { - EQEQ(arg0 = tmp1_subject, arg1 = 6) -> true - else -> EQEQ(arg0 = tmp1_subject, arg1 = 7) + EQEQ(arg0 = tmp_1, arg1 = 6) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 7) } } -> "567" when { - EQEQ(arg0 = tmp1_subject, arg1 = 8) -> true - else -> EQEQ(arg0 = tmp1_subject, arg1 = 9) + EQEQ(arg0 = tmp_1, arg1 = 8) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 9) } -> "89" else -> "?" } diff --git a/compiler/testData/ir/irText/expressions/when.kt.txt b/compiler/testData/ir/irText/expressions/when.kt.txt index f3561fe1c5f..3915248054b 100644 --- a/compiler/testData/ir/irText/expressions/when.kt.txt +++ b/compiler/testData/ir/irText/expressions/when.kt.txt @@ -9,13 +9,13 @@ object A { fun testWithSubject(x: Any?): String { return { // BLOCK - val tmp0_subject: Any? = x + val tmp_0: Any? = x when { - EQEQ(arg0 = tmp0_subject, arg1 = null) -> "null" - EQEQ(arg0 = tmp0_subject, arg1 = A) -> "A" - tmp0_subject is String -> "String" - tmp0_subject is Number.not() -> "!Number" - setOf().contains(element = tmp0_subject /*as Number */) -> "nothingness?" + EQEQ(arg0 = tmp_0, arg1 = null) -> "null" + EQEQ(arg0 = tmp_0, arg1 = A) -> "A" + tmp_0 is String -> "String" + tmp_0 is Number.not() -> "!Number" + setOf().contains(element = tmp_0 /*as Number */) -> "nothingness?" else -> "something" } } @@ -34,28 +34,28 @@ fun test(x: Any?): String { fun testComma(x: Int): String { return { // BLOCK - val tmp0_subject: Int = x + val tmp_1: Int = x when { when { when { when { - EQEQ(arg0 = tmp0_subject, arg1 = 1) -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 2) + EQEQ(arg0 = tmp_1, arg1 = 1) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 2) } -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 3) + else -> EQEQ(arg0 = tmp_1, arg1 = 3) } -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 4) + else -> EQEQ(arg0 = tmp_1, arg1 = 4) } -> "1234" when { when { - EQEQ(arg0 = tmp0_subject, arg1 = 5) -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 6) + EQEQ(arg0 = tmp_1, arg1 = 5) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 6) } -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 7) + else -> EQEQ(arg0 = tmp_1, arg1 = 7) } -> "567" when { - EQEQ(arg0 = tmp0_subject, arg1 = 8) -> true - else -> EQEQ(arg0 = tmp0_subject, arg1 = 9) + EQEQ(arg0 = tmp_1, arg1 = 8) -> true + else -> EQEQ(arg0 = tmp_1, arg1 = 9) } -> "89" else -> "?" } diff --git a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt.txt b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt.txt index 46dace829ab..4a28561f032 100644 --- a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.kt.txt @@ -1,8 +1,8 @@ fun foo(x: Int) { { // BLOCK - val tmp0_subject: Int = x + val tmp_0: Int = x when { - EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 0 /*~> Unit */ + EQEQ(arg0 = tmp_0, arg1 = 0) -> 0 /*~> Unit */ } } } diff --git a/compiler/testData/ir/irText/expressions/whenReturn.fir.kt.txt b/compiler/testData/ir/irText/expressions/whenReturn.fir.kt.txt index bd39afe8f55..cd134af7b9f 100644 --- a/compiler/testData/ir/irText/expressions/whenReturn.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenReturn.fir.kt.txt @@ -1,11 +1,11 @@ fun toString(grade: String): String { { // BLOCK - val tmp0_subject: String = grade + val tmp_0: String = grade when { - EQEQ(arg0 = tmp0_subject, arg1 = "A") -> return "Excellent" - EQEQ(arg0 = tmp0_subject, arg1 = "B") -> return "Good" - EQEQ(arg0 = tmp0_subject, arg1 = "C") -> return "Mediocre" - EQEQ(arg0 = tmp0_subject, arg1 = "D") -> return "Fair" + EQEQ(arg0 = tmp_0, arg1 = "A") -> return "Excellent" + EQEQ(arg0 = tmp_0, arg1 = "B") -> return "Good" + EQEQ(arg0 = tmp_0, arg1 = "C") -> return "Mediocre" + EQEQ(arg0 = tmp_0, arg1 = "D") -> return "Fair" else -> return "Failure" } } diff --git a/compiler/testData/ir/irText/expressions/whenReturn.kt.txt b/compiler/testData/ir/irText/expressions/whenReturn.kt.txt index bd39afe8f55..cd134af7b9f 100644 --- a/compiler/testData/ir/irText/expressions/whenReturn.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenReturn.kt.txt @@ -1,11 +1,11 @@ fun toString(grade: String): String { { // BLOCK - val tmp0_subject: String = grade + val tmp_0: String = grade when { - EQEQ(arg0 = tmp0_subject, arg1 = "A") -> return "Excellent" - EQEQ(arg0 = tmp0_subject, arg1 = "B") -> return "Good" - EQEQ(arg0 = tmp0_subject, arg1 = "C") -> return "Mediocre" - EQEQ(arg0 = tmp0_subject, arg1 = "D") -> return "Fair" + EQEQ(arg0 = tmp_0, arg1 = "A") -> return "Excellent" + EQEQ(arg0 = tmp_0, arg1 = "B") -> return "Good" + EQEQ(arg0 = tmp_0, arg1 = "C") -> return "Mediocre" + EQEQ(arg0 = tmp_0, arg1 = "D") -> return "Fair" else -> return "Failure" } } diff --git a/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt b/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt index ec1605a1ad1..fb7dca4c892 100644 --- a/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenReturnUnit.kt.txt @@ -4,10 +4,10 @@ fun run(block: Function0) { fun branch(x: Int) { return run(block = local fun () { { // BLOCK - val tmp0_subject: Int = x + val tmp_0: Int = x when { - EQEQ(arg0 = tmp0_subject, arg1 = 1) -> TODO(reason = "1") - EQEQ(arg0 = tmp0_subject, arg1 = 2) -> TODO(reason = "2") + EQEQ(arg0 = tmp_0, arg1 = 1) -> TODO(reason = "1") + EQEQ(arg0 = tmp_0, arg1 = 2) -> TODO(reason = "2") } } } diff --git a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.kt.txt b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.kt.txt index 392b37d01b9..6531e08cb7d 100644 --- a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.kt.txt @@ -26,14 +26,14 @@ fun test() { when { x is En -> { // BLOCK { // BLOCK - val tmp0_subject: En = x /*as En */ + val tmp_0: En = x /*as En */ when { - EQEQ(arg0 = tmp0_subject, arg1 = En.A) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.A) -> { // BLOCK r = "when1" } - EQEQ(arg0 = tmp0_subject, arg1 = En.B) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.B) -> { // BLOCK } - EQEQ(arg0 = tmp0_subject, arg1 = En.C) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.C) -> { // BLOCK } else -> noWhenBranchMatchedException() } @@ -44,14 +44,14 @@ fun test() { when { y is En -> { // BLOCK { // BLOCK - val tmp1_subject: En = y /*as En */ + val tmp_1: En = y /*as En */ when { - EQEQ(arg0 = tmp1_subject, arg1 = En.A) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.A) -> { // BLOCK r = "when2" } - EQEQ(arg0 = tmp1_subject, arg1 = En.B) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.B) -> { // BLOCK } - EQEQ(arg0 = tmp1_subject, arg1 = En.C) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.C) -> { // BLOCK } else -> noWhenBranchMatchedException() } diff --git a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt.txt b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt.txt index a0df38708d4..c194d8b7ae0 100644 --- a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.kt.txt @@ -26,14 +26,14 @@ fun test() { when { x is En -> { // BLOCK { // BLOCK - val tmp0_subject: En = x /*as En */ + val tmp_0: En = x /*as En */ when { - EQEQ(arg0 = tmp0_subject, arg1 = En.A) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.A) -> { // BLOCK r = "when1" } - EQEQ(arg0 = tmp0_subject, arg1 = En.B) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.B) -> { // BLOCK } - EQEQ(arg0 = tmp0_subject, arg1 = En.C) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = En.C) -> { // BLOCK } } } @@ -43,14 +43,14 @@ fun test() { when { y is En -> { // BLOCK { // BLOCK - val tmp1_subject: En = y /*as En */ + val tmp_1: En = y /*as En */ when { - EQEQ(arg0 = tmp1_subject, arg1 = En.A) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.A) -> { // BLOCK r = "when2" } - EQEQ(arg0 = tmp1_subject, arg1 = En.B) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.B) -> { // BLOCK } - EQEQ(arg0 = tmp1_subject, arg1 = En.C) -> { // BLOCK + EQEQ(arg0 = tmp_1, arg1 = En.C) -> { // BLOCK } } } diff --git a/compiler/testData/ir/irText/expressions/whenUnusedExpression.fir.kt.txt b/compiler/testData/ir/irText/expressions/whenUnusedExpression.fir.kt.txt index a8fab9b1d9a..5f90660dbd5 100644 --- a/compiler/testData/ir/irText/expressions/whenUnusedExpression.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenUnusedExpression.fir.kt.txt @@ -2,9 +2,9 @@ fun test(b: Boolean, i: Int) { when { b -> { // BLOCK { // BLOCK - val tmp0_subject: Int = i + val tmp_0: Int = i when { - EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 1 + EQEQ(arg0 = tmp_0, arg1 = 0) -> 1 else -> null } } diff --git a/compiler/testData/ir/irText/expressions/whenUnusedExpression.kt.txt b/compiler/testData/ir/irText/expressions/whenUnusedExpression.kt.txt index 8a91677e857..cf52a64cade 100644 --- a/compiler/testData/ir/irText/expressions/whenUnusedExpression.kt.txt +++ b/compiler/testData/ir/irText/expressions/whenUnusedExpression.kt.txt @@ -2,9 +2,9 @@ fun test(b: Boolean, i: Int) { when { b -> { // BLOCK { // BLOCK - val tmp0_subject: Int = i + val tmp_0: Int = i when { - EQEQ(arg0 = tmp0_subject, arg1 = 0) -> 1 /*~> Unit */ + EQEQ(arg0 = tmp_0, arg1 = 0) -> 1 /*~> Unit */ else -> null /*~> Unit */ } } diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt index bb6180a2313..e54a49e9050 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt @@ -2,15 +2,15 @@ fun test() { var x: Int = 0 while (less(arg0 = x, arg1 = 0)) while (less(arg0 = x, arg1 = 5)) { // BLOCK - val : Int = x - x = .inc() - + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } while (less(arg0 = x, arg1 = 10)) { // BLOCK { // BLOCK - val : Int = x - x = .inc() - + val tmp_1: Int = x + x = tmp_1.inc() + tmp_1 } } { // BLOCK @@ -22,17 +22,17 @@ fun test() { } { // BLOCK do{ // BLOCK - val : Int = x - x = .inc() - + val tmp_2: Int = x + x = tmp_2.inc() + tmp_2 } while (less(arg0 = x, arg1 = 15)) } { // BLOCK do// COMPOSITE { { // BLOCK - val : Int = x - x = .inc() - + val tmp_3: Int = x + x = tmp_3.inc() + tmp_3 } // } while (less(arg0 = x, arg1 = 20)) } diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.kt.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.kt.txt index cc3499e2efe..b824da31040 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.kt.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.kt.txt @@ -2,15 +2,15 @@ fun test() { var x: Int = 0 while (less(arg0 = x, arg1 = 0)) while (less(arg0 = x, arg1 = 5)) { // BLOCK - val tmp0: Int = x - x = tmp0.inc() - tmp0 + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } /*~> Unit */ while (less(arg0 = x, arg1 = 10)) { // BLOCK { // BLOCK - val tmp1: Int = x - x = tmp1.inc() - tmp1 + val tmp_1: Int = x + x = tmp_1.inc() + tmp_1 } /*~> Unit */ } { // BLOCK @@ -22,17 +22,17 @@ fun test() { } { // BLOCK do{ // BLOCK - val tmp2: Int = x - x = tmp2.inc() - tmp2 + val tmp_2: Int = x + x = tmp_2.inc() + tmp_2 } /*~> Unit */ while (less(arg0 = x, arg1 = 15)) } { // BLOCK do// COMPOSITE { { // BLOCK - val tmp3: Int = x - x = tmp3.inc() - tmp3 + val tmp_3: Int = x + x = tmp_3.inc() + tmp_3 } /*~> Unit */ // } while (less(arg0 = x, arg1 = 20)) } diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt index 7808418ba90..82c55d12e13 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt @@ -197,9 +197,9 @@ internal class ArrayMapImpl : ArrayMap { when { EQEQ(arg0 = .().get(index = index), arg1 = null) -> { // BLOCK { // BLOCK - val : Int = .() - .( = .inc()) - + val tmp_0: Int = .() + .( = tmp_0.inc()) + tmp_0 } } /*~> Unit */ } @@ -232,9 +232,9 @@ internal class ArrayMapImpl : ArrayMap { { // BLOCK do// COMPOSITE { { // BLOCK - val : Int = .() - .( = .inc()) - + val tmp_1: Int = .() + .( = tmp_1.inc()) + tmp_1 } // } while (when { less(arg0 = .(), arg1 = .().()) -> EQEQ(arg0 = .().get(index = .()), arg1 = null) @@ -261,9 +261,9 @@ internal class ArrayMapImpl : ArrayMap { when { EQEQ(arg0 = .().get(index = index), arg1 = null).not() -> { // BLOCK { // BLOCK - val : Int = .() - .( = .dec()) - + val tmp_2: Int = .() + .( = tmp_2.dec()) + tmp_2 } } /*~> Unit */ } @@ -327,12 +327,12 @@ internal class ArrayMapImpl : ArrayMap { when { other !is Entry -> return false } - val tmp0_other_with_cast: Entry = other as Entry + val tmp_3: Entry = other as Entry when { - EQEQ(arg0 = .#key, arg1 = tmp0_other_with_cast.#key).not() -> return false + EQEQ(arg0 = .#key, arg1 = tmp_3.#key).not() -> return false } when { - EQEQ(arg0 = .#value, arg1 = tmp0_other_with_cast.#value).not() -> return false + EQEQ(arg0 = .#value, arg1 = tmp_3.#value).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.kt.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.kt.txt index 1654bacddeb..1074389d65b 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.kt.txt @@ -197,11 +197,11 @@ internal class ArrayMapImpl : ArrayMap { when { EQEQ(arg0 = .().get(index = index), arg1 = null) -> { // BLOCK { // BLOCK - val tmp0_this: ArrayMapImpl = + val tmp_0: ArrayMapImpl = { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_1: Int = tmp_0.() + tmp_0.( = tmp_1.inc()) + tmp_1 } } } /*~> Unit */ @@ -235,11 +235,11 @@ internal class ArrayMapImpl : ArrayMap { { // BLOCK do// COMPOSITE { { // BLOCK - val tmp0_this: = + val tmp_2: = { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.inc()) - tmp1 + val tmp_3: Int = tmp_2.() + tmp_2.( = tmp_3.inc()) + tmp_3 } } /*~> Unit */ // } while (when { @@ -267,11 +267,11 @@ internal class ArrayMapImpl : ArrayMap { when { EQEQ(arg0 = .().get(index = index), arg1 = null).not() -> { // BLOCK { // BLOCK - val tmp0_this: ArrayMapImpl = + val tmp_4: ArrayMapImpl = { // BLOCK - val tmp1: Int = tmp0_this.() - tmp0_this.( = tmp1.dec()) - tmp1 + val tmp_5: Int = tmp_4.() + tmp_4.( = tmp_5.dec()) + tmp_5 } } } /*~> Unit */ @@ -336,12 +336,12 @@ internal class ArrayMapImpl : ArrayMap { when { other !is Entry -> return false } - val tmp0_other_with_cast: Entry = other as Entry + val tmp_6: Entry = other as Entry when { - EQEQ(arg0 = .#key, arg1 = tmp0_other_with_cast.#key).not() -> return false + EQEQ(arg0 = .#key, arg1 = tmp_6.#key).not() -> return false } when { - EQEQ(arg0 = .#value, arg1 = tmp0_other_with_cast.#value).not() -> return false + EQEQ(arg0 = .#value, arg1 = tmp_6.#value).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt index f6736864a4a..0af99456531 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.kt.txt @@ -40,56 +40,56 @@ fun main() { val a: A = A() id(t = a).( = 10) { // BLOCK - val : A = id(t = a) - .( = .().plus(other = 20)) + val tmp_0: A = id(t = a) + tmp_0.( = tmp_0.().plus(other = 20)) } { // BLOCK - val : A = id(t = a) - .( = .().minus(other = 20)) + val tmp_1: A = id(t = a) + tmp_1.( = tmp_1.().minus(other = 20)) } { // BLOCK - val : A = id(t = a) - .( = .().times(other = 2)) + val tmp_2: A = id(t = a) + tmp_2.( = tmp_2.().times(other = 2)) } { // BLOCK - val : A = id(t = a) - .( = .().div(other = 5)) + val tmp_3: A = id(t = a) + tmp_3.( = tmp_3.().div(other = 5)) } { // BLOCK - val : A = id(t = a) - .( = .().rem(other = 3)) + val tmp_4: A = id(t = a) + tmp_4.( = tmp_4.().rem(other = 3)) } { // BLOCK - val : A = id(t = a) - val : Int = .() - .( = .inc()) - + val tmp_5: A = id(t = a) + val tmp_6: Int = tmp_5.() + tmp_5.( = tmp_6.inc()) + tmp_6 } /*~> Unit */ { // BLOCK - val : A = id(t = a) - val : Int = .() - .( = .dec()) - + val tmp_7: A = id(t = a) + val tmp_8: Int = tmp_7.() + tmp_7.( = tmp_8.dec()) + tmp_8 } /*~> Unit */ { // BLOCK - val : A = id(t = a) - .( = .().inc()) - .() + val tmp_9: A = id(t = a) + tmp_9.( = tmp_9.().inc()) + tmp_9.() } /*~> Unit */ { // BLOCK - val : A = id(t = a) - .( = .().dec()) - .() + val tmp_10: A = id(t = a) + tmp_10.( = tmp_10.().dec()) + tmp_10.() } /*~> Unit */ { // BLOCK - val : Int = B.() - B.( = .inc()) - + val tmp_11: Int = B.() + B.( = tmp_11.inc()) + tmp_11 } /*~> Unit */ { // BLOCK - val : Int = B.() - B.( = .dec()) - + val tmp_12: Int = B.() + B.( = tmp_12.dec()) + tmp_12 } /*~> Unit */ { // BLOCK B.( = B.().inc()) @@ -101,64 +101,64 @@ fun main() { } /*~> Unit */ id>(t = ()).set(index = 0, value = 10) { // BLOCK - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).plus(other = 20)) + val tmp_13: Array = id>(t = ()) + val tmp_14: Int = 0 + tmp_13.set(index = tmp_14, value = tmp_13.get(index = tmp_14).plus(other = 20)) } { // BLOCK - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).minus(other = 20)) + val tmp_15: Array = id>(t = ()) + val tmp_16: Int = 0 + tmp_15.set(index = tmp_16, value = tmp_15.get(index = tmp_16).minus(other = 20)) } { // BLOCK - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).times(other = 2)) + val tmp_17: Array = id>(t = ()) + val tmp_18: Int = 0 + tmp_17.set(index = tmp_18, value = tmp_17.get(index = tmp_18).times(other = 2)) } { // BLOCK - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).div(other = 5)) + val tmp_19: Array = id>(t = ()) + val tmp_20: Int = 0 + tmp_19.set(index = tmp_20, value = tmp_19.get(index = tmp_20).div(other = 5)) } { // BLOCK - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).rem(other = 3)) + val tmp_21: Array = id>(t = ()) + val tmp_22: Int = 0 + tmp_21.set(index = tmp_22, value = tmp_21.get(index = tmp_22).rem(other = 3)) } - val : Array = id>(t = ()) - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .inc()) - /*~> Unit */ - val : Array = id>(t = ()) - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .dec()) - /*~> Unit */ - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).inc()) - .get(index = ) /*~> Unit */ - val : Array = id>(t = ()) - val : Int = 0 - .set(index = , value = .get(index = ).dec()) - .get(index = ) /*~> Unit */ - val : Array = () - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .inc()) - /*~> Unit */ - val : Array = () - val : Int = 0 - val : Int = .get(index = ) - .set(index = , value = .dec()) - /*~> Unit */ - val : Array = () - val : Int = 0 - .set(index = , value = .get(index = ).inc()) - .get(index = ) /*~> Unit */ - val : Array = () - val : Int = 0 - .set(index = , value = .get(index = ).dec()) - .get(index = ) /*~> Unit */ + val tmp_23: Array = id>(t = ()) + val tmp_24: Int = 0 + val tmp_25: Int = tmp_23.get(index = tmp_24) + tmp_23.set(index = tmp_24, value = tmp_25.inc()) + tmp_25 /*~> Unit */ + val tmp_26: Array = id>(t = ()) + val tmp_27: Int = 0 + val tmp_28: Int = tmp_26.get(index = tmp_27) + tmp_26.set(index = tmp_27, value = tmp_28.dec()) + tmp_28 /*~> Unit */ + val tmp_29: Array = id>(t = ()) + val tmp_30: Int = 0 + tmp_29.set(index = tmp_30, value = tmp_29.get(index = tmp_30).inc()) + tmp_29.get(index = tmp_30) /*~> Unit */ + val tmp_31: Array = id>(t = ()) + val tmp_32: Int = 0 + tmp_31.set(index = tmp_32, value = tmp_31.get(index = tmp_32).dec()) + tmp_31.get(index = tmp_32) /*~> Unit */ + val tmp_33: Array = () + val tmp_34: Int = 0 + val tmp_35: Int = tmp_33.get(index = tmp_34) + tmp_33.set(index = tmp_34, value = tmp_35.inc()) + tmp_35 /*~> Unit */ + val tmp_36: Array = () + val tmp_37: Int = 0 + val tmp_38: Int = tmp_36.get(index = tmp_37) + tmp_36.set(index = tmp_37, value = tmp_38.dec()) + tmp_38 /*~> Unit */ + val tmp_39: Array = () + val tmp_40: Int = 0 + tmp_39.set(index = tmp_40, value = tmp_39.get(index = tmp_40).inc()) + tmp_39.get(index = tmp_40) /*~> Unit */ + val tmp_41: Array = () + val tmp_42: Int = 0 + tmp_41.set(index = tmp_42, value = tmp_41.get(index = tmp_42).dec()) + tmp_41.get(index = tmp_42) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt index 72a8f56dc6d..1a28583687b 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.kt.txt @@ -40,161 +40,161 @@ fun main() { val a: A = A() id(t = a).( = 10) { // BLOCK - val tmp0_this: A = id(t = a) - tmp0_this.( = tmp0_this.().plus(other = 20)) + val tmp_0: A = id(t = a) + tmp_0.( = tmp_0.().plus(other = 20)) } { // BLOCK - val tmp1_this: A = id(t = a) - tmp1_this.( = tmp1_this.().minus(other = 20)) + val tmp_1: A = id(t = a) + tmp_1.( = tmp_1.().minus(other = 20)) } { // BLOCK - val tmp2_this: A = id(t = a) - tmp2_this.( = tmp2_this.().times(other = 2)) + val tmp_2: A = id(t = a) + tmp_2.( = tmp_2.().times(other = 2)) } { // BLOCK - val tmp3_this: A = id(t = a) - tmp3_this.( = tmp3_this.().div(other = 5)) + val tmp_3: A = id(t = a) + tmp_3.( = tmp_3.().div(other = 5)) } { // BLOCK - val tmp4_this: A = id(t = a) - tmp4_this.( = tmp4_this.().rem(other = 3)) + val tmp_4: A = id(t = a) + tmp_4.( = tmp_4.().rem(other = 3)) } { // BLOCK - val tmp5_this: A = id(t = a) + val tmp_5: A = id(t = a) { // BLOCK - val tmp6: Int = tmp5_this.() - tmp5_this.( = tmp6.inc()) - tmp6 + val tmp_6: Int = tmp_5.() + tmp_5.( = tmp_6.inc()) + tmp_6 } } /*~> Unit */ { // BLOCK - val tmp7_this: A = id(t = a) + val tmp_7: A = id(t = a) { // BLOCK - val tmp8: Int = tmp7_this.() - tmp7_this.( = tmp8.dec()) - tmp8 + val tmp_8: Int = tmp_7.() + tmp_7.( = tmp_8.dec()) + tmp_8 } } /*~> Unit */ { // BLOCK - val tmp9_this: A = id(t = a) + val tmp_9: A = id(t = a) { // BLOCK - tmp9_this.( = tmp9_this.().inc()) - tmp9_this.() + tmp_9.( = tmp_9.().inc()) + tmp_9.() } } /*~> Unit */ { // BLOCK - val tmp10_this: A = id(t = a) + val tmp_10: A = id(t = a) { // BLOCK - tmp10_this.( = tmp10_this.().dec()) - tmp10_this.() + tmp_10.( = tmp_10.().dec()) + tmp_10.() } } /*~> Unit */ { // BLOCK - val tmp11_this: B = B + val tmp_11: B = B { // BLOCK - val tmp12: Int = tmp11_this.() - tmp11_this.( = tmp12.inc()) - tmp12 + val tmp_12: Int = tmp_11.() + tmp_11.( = tmp_12.inc()) + tmp_12 } } /*~> Unit */ { // BLOCK - val tmp13_this: B = B + val tmp_13: B = B { // BLOCK - val tmp14: Int = tmp13_this.() - tmp13_this.( = tmp14.dec()) - tmp14 + val tmp_14: Int = tmp_13.() + tmp_13.( = tmp_14.dec()) + tmp_14 } } /*~> Unit */ { // BLOCK - val tmp15_this: B = B + val tmp_15: B = B { // BLOCK - tmp15_this.( = tmp15_this.().inc()) - tmp15_this.() + tmp_15.( = tmp_15.().inc()) + tmp_15.() } } /*~> Unit */ { // BLOCK - val tmp16_this: B = B + val tmp_16: B = B { // BLOCK - tmp16_this.( = tmp16_this.().dec()) - tmp16_this.() + tmp_16.( = tmp_16.().dec()) + tmp_16.() } } /*~> Unit */ id>(t = ()).set(index = 0, value = 10) { // BLOCK - val tmp17_array: Array = id>(t = ()) - val tmp18_index0: Int = 0 - tmp17_array.set(index = tmp18_index0, value = tmp17_array.get(index = tmp18_index0).plus(other = 20)) + val tmp_17: Array = id>(t = ()) + val tmp_18: Int = 0 + tmp_17.set(index = tmp_18, value = tmp_17.get(index = tmp_18).plus(other = 20)) } { // BLOCK - val tmp19_array: Array = id>(t = ()) - val tmp20_index0: Int = 0 - tmp19_array.set(index = tmp20_index0, value = tmp19_array.get(index = tmp20_index0).minus(other = 20)) + val tmp_19: Array = id>(t = ()) + val tmp_20: Int = 0 + tmp_19.set(index = tmp_20, value = tmp_19.get(index = tmp_20).minus(other = 20)) } { // BLOCK - val tmp21_array: Array = id>(t = ()) - val tmp22_index0: Int = 0 - tmp21_array.set(index = tmp22_index0, value = tmp21_array.get(index = tmp22_index0).times(other = 2)) + val tmp_21: Array = id>(t = ()) + val tmp_22: Int = 0 + tmp_21.set(index = tmp_22, value = tmp_21.get(index = tmp_22).times(other = 2)) } { // BLOCK - val tmp23_array: Array = id>(t = ()) - val tmp24_index0: Int = 0 - tmp23_array.set(index = tmp24_index0, value = tmp23_array.get(index = tmp24_index0).div(other = 5)) + val tmp_23: Array = id>(t = ()) + val tmp_24: Int = 0 + tmp_23.set(index = tmp_24, value = tmp_23.get(index = tmp_24).div(other = 5)) } { // BLOCK - val tmp25_array: Array = id>(t = ()) - val tmp26_index0: Int = 0 - tmp25_array.set(index = tmp26_index0, value = tmp25_array.get(index = tmp26_index0).rem(other = 3)) + val tmp_25: Array = id>(t = ()) + val tmp_26: Int = 0 + tmp_25.set(index = tmp_26, value = tmp_25.get(index = tmp_26).rem(other = 3)) } { // BLOCK - val tmp27_array: Array = id>(t = ()) - val tmp28_index0: Int = 0 - val tmp29: Int = tmp27_array.get(index = tmp28_index0) - tmp27_array.set(index = tmp28_index0, value = tmp29.inc()) - tmp29 + val tmp_27: Array = id>(t = ()) + val tmp_28: Int = 0 + val tmp_29: Int = tmp_27.get(index = tmp_28) + tmp_27.set(index = tmp_28, value = tmp_29.inc()) + tmp_29 } /*~> Unit */ { // BLOCK - val tmp30_array: Array = id>(t = ()) - val tmp31_index0: Int = 0 - val tmp32: Int = tmp30_array.get(index = tmp31_index0) - tmp30_array.set(index = tmp31_index0, value = tmp32.dec()) - tmp32 + val tmp_30: Array = id>(t = ()) + val tmp_31: Int = 0 + val tmp_32: Int = tmp_30.get(index = tmp_31) + tmp_30.set(index = tmp_31, value = tmp_32.dec()) + tmp_32 } /*~> Unit */ { // BLOCK - val tmp33_array: Array = id>(t = ()) - val tmp34_index0: Int = 0 - tmp33_array.set(index = tmp34_index0, value = tmp33_array.get(index = tmp34_index0).inc()) - tmp33_array.get(index = tmp34_index0) + val tmp_33: Array = id>(t = ()) + val tmp_34: Int = 0 + tmp_33.set(index = tmp_34, value = tmp_33.get(index = tmp_34).inc()) + tmp_33.get(index = tmp_34) } /*~> Unit */ { // BLOCK - val tmp35_array: Array = id>(t = ()) - val tmp36_index0: Int = 0 - tmp35_array.set(index = tmp36_index0, value = tmp35_array.get(index = tmp36_index0).dec()) - tmp35_array.get(index = tmp36_index0) + val tmp_35: Array = id>(t = ()) + val tmp_36: Int = 0 + tmp_35.set(index = tmp_36, value = tmp_35.get(index = tmp_36).dec()) + tmp_35.get(index = tmp_36) } /*~> Unit */ { // BLOCK - val tmp37_array: Array = () - val tmp38_index0: Int = 0 - val tmp39: Int = tmp37_array.get(index = tmp38_index0) - tmp37_array.set(index = tmp38_index0, value = tmp39.inc()) - tmp39 + val tmp_37: Array = () + val tmp_38: Int = 0 + val tmp_39: Int = tmp_37.get(index = tmp_38) + tmp_37.set(index = tmp_38, value = tmp_39.inc()) + tmp_39 } /*~> Unit */ { // BLOCK - val tmp40_array: Array = () - val tmp41_index0: Int = 0 - val tmp42: Int = tmp40_array.get(index = tmp41_index0) - tmp40_array.set(index = tmp41_index0, value = tmp42.dec()) - tmp42 + val tmp_40: Array = () + val tmp_41: Int = 0 + val tmp_42: Int = tmp_40.get(index = tmp_41) + tmp_40.set(index = tmp_41, value = tmp_42.dec()) + tmp_42 } /*~> Unit */ { // BLOCK - val tmp43_array: Array = () - val tmp44_index0: Int = 0 - tmp43_array.set(index = tmp44_index0, value = tmp43_array.get(index = tmp44_index0).inc()) - tmp43_array.get(index = tmp44_index0) + val tmp_43: Array = () + val tmp_44: Int = 0 + tmp_43.set(index = tmp_44, value = tmp_43.get(index = tmp_44).inc()) + tmp_43.get(index = tmp_44) } /*~> Unit */ { // BLOCK - val tmp45_array: Array = () - val tmp46_index0: Int = 0 - tmp45_array.set(index = tmp46_index0, value = tmp45_array.get(index = tmp46_index0).dec()) - tmp45_array.get(index = tmp46_index0) + val tmp_45: Array = () + val tmp_46: Int = 0 + tmp_45.set(index = tmp_46, value = tmp_45.get(index = tmp_46).dec()) + tmp_45.get(index = tmp_46) } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.kt.txt index dad3086b399..2290839aaee 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.fir.kt.txt @@ -46,15 +46,15 @@ private val registrationMap: HashMap fun resolveClashesIfAny(container: ComponentContainer, clashResolvers: List>) { { // BLOCK - val : Iterator> = clashResolvers.iterator() - while (.hasNext()) { // BLOCK - val resolver: PlatformExtensionsClashResolver<*> = .next() + val tmp_0: Iterator> = clashResolvers.iterator() + while (tmp_0.hasNext()) { // BLOCK + val resolver: PlatformExtensionsClashResolver<*> = tmp_0.next() { // BLOCK val clashedComponents: Collection = { // BLOCK - val : Collection? = ().get(p0 = resolver.()) as? Collection + val tmp_1: Collection? = ().get(p0 = resolver.()) as? Collection when { - EQEQ(arg0 = , arg1 = null) -> continue - else -> + EQEQ(arg0 = tmp_1, arg1 = null) -> continue + else -> tmp_1 } } val substituteDescriptor: ClashResolutionDescriptor>>>>> = ClashResolutionDescriptor>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList()) diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt index 40d9377c2d4..8d381b7472c 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt @@ -46,15 +46,15 @@ private val registrationMap: HashMap fun resolveClashesIfAny(container: ComponentContainer, clashResolvers: List>) { { // BLOCK - val tmp0_iterator: Iterator> = clashResolvers.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val resolver: PlatformExtensionsClashResolver<*> = tmp0_iterator.next() + val tmp_0: Iterator> = clashResolvers.iterator() + while (tmp_0.hasNext()) { // BLOCK + val resolver: PlatformExtensionsClashResolver<*> = tmp_0.next() { // BLOCK val clashedComponents: Collection = { // BLOCK - val tmp1_elvis_lhs: Collection? = ().get(key = resolver.()) as? Collection + val tmp_1: Collection? = ().get(key = resolver.()) as? Collection when { - EQEQ(arg0 = tmp1_elvis_lhs, arg1 = null) -> continue - else -> tmp1_elvis_lhs + EQEQ(arg0 = tmp_1, arg1 = null) -> continue + else -> tmp_1 } } val substituteDescriptor: ClashResolutionDescriptor>>>>> = ClashResolutionDescriptor>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList()) diff --git a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.fir.kt.txt b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.fir.kt.txt index 66eba2cb8d0..e7d784c9c07 100644 --- a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.fir.kt.txt @@ -54,11 +54,11 @@ class DeepCopyIrTreeWithSymbols { )) .().withinScope(irTypeParametersContainer = , fn = local fun () { { // BLOCK - val : Iterator> = .().zip(other = other.()).iterator() - while (.hasNext()) { // BLOCK - val : Pair = .next() - val thisTypeParameter: IrTypeParameter = .component1() - val otherTypeParameter: IrTypeParameter = .component2() + val tmp_0: Iterator> = .().zip(other = other.()).iterator() + while (tmp_0.hasNext()) { // BLOCK + val tmp_1: Pair = tmp_0.next() + val thisTypeParameter: IrTypeParameter = tmp_1.component1() + val otherTypeParameter: IrTypeParameter = tmp_1.component2() { // BLOCK otherTypeParameter.().mapTo>(destination = thisTypeParameter.(), transform = local fun (it: IrType): IrType { return .().remapType(type = it) diff --git a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt index 5ac3eca9d52..c09c4d538f1 100644 --- a/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DeepCopyIrTree.kt.txt @@ -54,11 +54,11 @@ class DeepCopyIrTreeWithSymbols { )) .().withinScope(irTypeParametersContainer = , fn = local fun () { { // BLOCK - val tmp0_iterator: Iterator> = .().zip(other = other.()).iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val tmp1_loop_parameter: Pair = tmp0_iterator.next() - val thisTypeParameter: IrTypeParameter = tmp1_loop_parameter.component1() - val otherTypeParameter: IrTypeParameter = tmp1_loop_parameter.component2() + val tmp_0: Iterator> = .().zip(other = other.()).iterator() + while (tmp_0.hasNext()) { // BLOCK + val tmp_1: Pair = tmp_0.next() + val thisTypeParameter: IrTypeParameter = tmp_1.component1() + val otherTypeParameter: IrTypeParameter = tmp_1.component2() { // BLOCK otherTypeParameter.().mapTo>(destination = thisTypeParameter.(), transform = local fun (it: IrType): IrType { return .().remapType(type = it) diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt index 31d5a81df78..e23a427a620 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.fir.kt.txt @@ -76,10 +76,10 @@ fun box(): String { val stack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(stack = listOf>(elements = [ImplicitReceiverValue(boundSymbol = null, type = "O"), ImplicitReceiverValue(boundSymbol = null, type = "K")])) foo(stack = stack) return stack.first>().().plus(other = { // BLOCK - val tmp0_safe_receiver: ImplicitReceiverValue<*>? = stack.get(name = null) + val tmp_0: ImplicitReceiverValue<*>? = stack.get(name = null) when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } }) } diff --git a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt index 31d5a81df78..e23a427a620 100644 --- a/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ImplicitReceiverStack.kt.txt @@ -76,10 +76,10 @@ fun box(): String { val stack: PersistentImplicitReceiverStack = PersistentImplicitReceiverStack(stack = listOf>(elements = [ImplicitReceiverValue(boundSymbol = null, type = "O"), ImplicitReceiverValue(boundSymbol = null, type = "K")])) foo(stack = stack) return stack.first>().().plus(other = { // BLOCK - val tmp0_safe_receiver: ImplicitReceiverValue<*>? = stack.get(name = null) + val tmp_0: ImplicitReceiverValue<*>? = stack.get(name = null) when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.() } }) } diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt index 092fc6ef0a1..f6ee232fa94 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.kt.txt @@ -35,9 +35,9 @@ data class Some { when { other !is Some -> return false } - val tmp0_other_with_cast: Some = other as Some + val tmp_0: Some = other as Some when { - EQEQ(arg0 = .#value, arg1 = tmp0_other_with_cast.#value).not() -> return false + EQEQ(arg0 = .#value, arg1 = tmp_0.#value).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt index b6c240df811..e3ac58d0295 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt @@ -35,9 +35,9 @@ data class Some { when { other !is Some -> return false } - val tmp0_other_with_cast: Some = other as Some + val tmp_0: Some = other as Some when { - EQEQ(arg0 = .#value, arg1 = tmp0_other_with_cast.#value).not() -> return false + EQEQ(arg0 = .#value, arg1 = tmp_0.#value).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.ir.txt b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.ir.txt deleted file mode 100644 index 72a295c0b61..00000000000 --- a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.ir.txt +++ /dev/null @@ -1,105 +0,0 @@ -FILE fqName: fileName:/SafeLetWithReturn.kt - FUN name:foo visibility:public modality:FINAL <> (s:kotlin.String?) returnType:kotlin.String - VALUE_PARAMETER name:s index:0 type:kotlin.String? - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Nothing? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String? [val] - GET_VAR 's: kotlin.String? declared in .foo' type=kotlin.String? origin=null - WHEN type=kotlin.Nothing? origin=null - 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.String? declared in .foo' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Null type=kotlin.Nothing? value=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Nothing origin=null - : kotlin.String - : kotlin.Nothing - $receiver: GET_VAR 'val tmp_0: kotlin.String? declared in .foo' type=kotlin.String? origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Nothing - VALUE_PARAMETER name:it index:0 type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (s: kotlin.String?): kotlin.String declared in ' - GET_VAR 'it: kotlin.String declared in .foo.' type=kotlin.String origin=null - RETURN type=kotlin.Nothing from='public final fun foo (s: kotlin.String?): kotlin.String declared in ' - CONST String type=kotlin.String value="" - FUN name:bar visibility:public modality:FINAL <> (s:kotlin.String?, t:kotlin.String?) returnType:kotlin.String - VALUE_PARAMETER name:s index:0 type:kotlin.String? - VALUE_PARAMETER name:t index:1 type:kotlin.String? - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Nothing? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val] - GET_VAR 's: kotlin.String? declared in .bar' type=kotlin.String? origin=null - WHEN type=kotlin.Nothing? origin=null - 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.String? declared in .bar' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Null type=kotlin.Nothing? value=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Nothing? origin=null - : kotlin.String - : kotlin.Nothing? - $receiver: GET_VAR 'val tmp_1: kotlin.String? declared in .bar' type=kotlin.String? origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Nothing? - VALUE_PARAMETER name:it index:0 type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.String): kotlin.Nothing? declared in .bar' - BLOCK type=kotlin.Nothing? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val] - GET_VAR 't: kotlin.String? declared in .bar' type=kotlin.String? origin=null - WHEN type=kotlin.Nothing? origin=null - 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.String? declared in .bar.' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Null type=kotlin.Nothing? value=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Nothing origin=null - : kotlin.String - : kotlin.Nothing - $receiver: GET_VAR 'val tmp_2: kotlin.String? declared in .bar.' type=kotlin.String? origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Nothing - VALUE_PARAMETER name:it index:0 type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun bar (s: kotlin.String?, t: kotlin.String?): kotlin.String declared in ' - GET_VAR 'it: kotlin.String declared in .bar..' type=kotlin.String origin=null - RETURN type=kotlin.Nothing from='public final fun bar (s: kotlin.String?, t: kotlin.String?): kotlin.String declared in ' - CONST String type=kotlin.String value="" - PROPERTY name:baz visibility:public modality:FINAL [val] - FUN name: visibility:public modality:FINAL <> ($receiver:kotlin.String?) returnType:kotlin.String - correspondingProperty: PROPERTY name:baz visibility:public modality:FINAL [val] - $receiver: VALUE_PARAMETER name: type:kotlin.String? - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Nothing? origin=SAFE_CALL - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.String? [val] - GET_VAR ': kotlin.String? declared in .' type=kotlin.String? origin=null - WHEN type=kotlin.Nothing? origin=null - 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.String? declared in .' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Null type=kotlin.Nothing? value=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CALL 'public final fun let (block: kotlin.Function1): R of kotlin.let declared in kotlin' type=kotlin.Nothing origin=null - : kotlin.String - : kotlin.Nothing - $receiver: GET_VAR 'val tmp_3: kotlin.String? declared in .' type=kotlin.String? origin=null - block: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.String) returnType:kotlin.Nothing - VALUE_PARAMETER name:it index:0 type:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - GET_VAR 'it: kotlin.String declared in ..' type=kotlin.String origin=null - RETURN type=kotlin.Nothing from='public final fun (): kotlin.String declared in ' - CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.kt.txt b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.kt.txt deleted file mode 100644 index 3a3f532ef23..00000000000 --- a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.fir.kt.txt +++ /dev/null @@ -1,51 +0,0 @@ -fun foo(s: String?): String { - { // BLOCK - val tmp0_safe_receiver: String? = s - when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: String): Nothing { - return it - } -) - } - } /*~> Unit */ - return "" -} - -fun bar(s: String?, t: String?): String { - { // BLOCK - val tmp1_safe_receiver: String? = s - when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.let(block = local fun (it: String): Nothing? { - return { // BLOCK - val tmp2_safe_receiver: String? = t - when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.let(block = local fun (it: String): Nothing { - return it - } -) - } - } - } -) - } - } /*~> Unit */ - return "" -} - -val String?.baz: String - get(): String { - { // BLOCK - val tmp3_safe_receiver: String? = - when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null - else -> tmp3_safe_receiver.let(block = local fun (it: String): Nothing { - return it - } -) - } - } /*~> Unit */ - return "" - } diff --git a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt index 1bf57eb6a51..efdfe70e034 100644 --- a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt +++ b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // WITH_STDLIB fun foo(s: String?): String { diff --git a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt.txt b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt.txt index c8b025a9379..8cf060e27fd 100644 --- a/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SafeLetWithReturn.kt.txt @@ -1,9 +1,9 @@ fun foo(s: String?): String { { // BLOCK - val tmp0_safe_receiver: String? = s + val tmp_0: String? = s when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: String): Nothing { + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.let(block = local fun (it: String): Nothing { return it } ) @@ -14,15 +14,15 @@ fun foo(s: String?): String { fun bar(s: String?, t: String?): String { { // BLOCK - val tmp0_safe_receiver: String? = s + val tmp_1: String? = s when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: String): Nothing? { + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.let(block = local fun (it: String): Nothing? { return { // BLOCK - val tmp0_safe_receiver: String? = t + val tmp_2: String? = t when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: String): Nothing { + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.let(block = local fun (it: String): Nothing { return it } ) @@ -38,10 +38,10 @@ fun bar(s: String?, t: String?): String { val String?.baz: String get(): String { { // BLOCK - val tmp0_safe_receiver: String? = + val tmp_3: String? = when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: String): Nothing { + EQEQ(arg0 = tmp_3, arg1 = null) -> null + else -> tmp_3.let(block = local fun (it: String): Nothing { return it } ) diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt index 885787f7327..2c5ed10d260 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.fir.kt.txt @@ -67,9 +67,9 @@ data class DataClass : Derived, Delegate { when { other !is DataClass -> return false } - val tmp0_other_with_cast: DataClass = other as DataClass + val tmp_0: DataClass = other as DataClass when { - EQEQ(arg0 = .#delegate, arg1 = tmp0_other_with_cast.#delegate).not() -> return false + EQEQ(arg0 = .#delegate, arg1 = tmp_0.#delegate).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt index b31f65e14d9..159ca53fa30 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt @@ -67,9 +67,9 @@ data class DataClass : Derived, Delegate { when { other !is DataClass -> return false } - val tmp0_other_with_cast: DataClass = other as DataClass + val tmp_0: DataClass = other as DataClass when { - EQEQ(arg0 = .#delegate, arg1 = tmp0_other_with_cast.#delegate).not() -> return false + EQEQ(arg0 = .#delegate, arg1 = tmp_0.#delegate).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt index 170f540c55c..ac9ab9722b9 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt @@ -4,13 +4,13 @@ private const val BACKSLASH: Char private fun Reader.nextChar(): Char? { return { // BLOCK - val tmp0_safe_receiver: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { + val tmp_0: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { return EQEQ(arg0 = it, arg1 = -1) } ) when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toChar() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toChar() } } } @@ -23,10 +23,10 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) { }) { // BLOCK when { EQEQ(arg0 = ch, arg1 = '\\') -> { // BLOCK - val tmp1_safe_receiver: Char? = .nextChar() + val tmp_1: Char? = .nextChar() when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { return sb.append(p0 = it) } ) diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt index cbcf83899af..66bbe8830b6 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.kt.txt @@ -4,13 +4,13 @@ private const val BACKSLASH: Char private fun Reader.nextChar(): Char? { return { // BLOCK - val tmp0_safe_receiver: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { + val tmp_0: Int? = .read().takeUnless(predicate = local fun (it: Int): Boolean { return EQEQ(arg0 = it, arg1 = -1) } ) when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.toChar() + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.toChar() } } } @@ -23,10 +23,10 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) { }) { // BLOCK when { EQEQ(arg0 = ch, arg1 = ()) -> { // BLOCK - val tmp0_safe_receiver: Char? = .nextChar() + val tmp_1: Char? = .nextChar() when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.let(block = local fun (it: Char): @FlexibleNullability StringBuilder? { return sb.append(p0 = it) } ) diff --git a/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.fir.kt.txt b/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.fir.kt.txt index 81366e83387..64a8b71db11 100644 --- a/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.fir.kt.txt @@ -20,10 +20,10 @@ class Test { } } return { // BLOCK - val : ResourceTable? = .#resourceTable + val tmp_0: ResourceTable? = .#resourceTable when { - EQEQ(arg0 = , arg1 = null) -> ResourceTable() - else -> + EQEQ(arg0 = tmp_0, arg1 = null) -> ResourceTable() + else -> tmp_0 } } } diff --git a/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.kt.txt b/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.kt.txt index 83449a62937..64a8b71db11 100644 --- a/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.kt.txt +++ b/compiler/testData/ir/irText/firProblems/elvisOnBackingFieldInGetter.kt.txt @@ -20,10 +20,10 @@ class Test { } } return { // BLOCK - val tmp0_elvis_lhs: ResourceTable? = .#resourceTable + val tmp_0: ResourceTable? = .#resourceTable when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> ResourceTable() - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> ResourceTable() + else -> tmp_0 } } } diff --git a/compiler/testData/ir/irText/firProblems/emptyWhen.kt.txt b/compiler/testData/ir/irText/firProblems/emptyWhen.kt.txt index 3c2f2e9d099..f01fa1d2ca0 100644 --- a/compiler/testData/ir/irText/firProblems/emptyWhen.kt.txt +++ b/compiler/testData/ir/irText/firProblems/emptyWhen.kt.txt @@ -3,14 +3,14 @@ fun foo() { } val x: Int = 0 { // BLOCK - val tmp0_subject: Int = x + val tmp_0: Int = x when { else -> { // BLOCK } } } val z: Unit = { // BLOCK - val tmp1_subject: Int = x + val tmp_1: Int = x when { else -> { // BLOCK } diff --git a/compiler/testData/ir/irText/firProblems/kt55458.fir.kt.txt b/compiler/testData/ir/irText/firProblems/kt55458.fir.kt.txt index 5ac6e131ff6..8830e3da709 100644 --- a/compiler/testData/ir/irText/firProblems/kt55458.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/kt55458.fir.kt.txt @@ -1,5 +1,5 @@ fun main() { - val : Pair = 1.to(that = 2) - val a: Int = .component1() + val tmp_0: Pair = 1.to(that = 2) + val a: Int = tmp_0.component1() println(message = a) } diff --git a/compiler/testData/ir/irText/firProblems/kt55458.kt.txt b/compiler/testData/ir/irText/firProblems/kt55458.kt.txt index 5f4433b80b4..c1c3436eebd 100644 --- a/compiler/testData/ir/irText/firProblems/kt55458.kt.txt +++ b/compiler/testData/ir/irText/firProblems/kt55458.kt.txt @@ -1,7 +1,7 @@ fun main() { // COMPOSITE { - val tmp0_container: Pair = 1.to(that = 2) - val a: Int = tmp0_container.component1() + val tmp_0: Pair = 1.to(that = 2) + val a: Int = tmp_0.component1() // } println(message = a) } diff --git a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt index 8eecd2fc7e5..e0996b6c51d 100644 --- a/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/valueClassEquals.fir.kt.txt @@ -22,9 +22,9 @@ value class Z { when { other !is Z -> return false } - val tmp0_other_with_cast: Z = other as Z + val tmp_0: Z = other as Z when { - EQEQ(arg0 = .#s, arg1 = tmp0_other_with_cast.#s).not() -> return false + EQEQ(arg0 = .#s, arg1 = tmp_0.#s).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/firProblems/valueClassEquals.kt.txt b/compiler/testData/ir/irText/firProblems/valueClassEquals.kt.txt index eccd5502402..5456f123bc7 100644 --- a/compiler/testData/ir/irText/firProblems/valueClassEquals.kt.txt +++ b/compiler/testData/ir/irText/firProblems/valueClassEquals.kt.txt @@ -22,9 +22,9 @@ value class Z { when { other !is Z -> return false } - val tmp0_other_with_cast: Z = other as Z + val tmp_0: Z = other as Z when { - EQEQ(arg0 = .#s, arg1 = tmp0_other_with_cast.#s).not() -> return false + EQEQ(arg0 = .#s, arg1 = tmp_0.#s).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicCall.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicCall.kt.txt index c938a630c8e..55ff791d57d 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicCall.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicCall.kt.txt @@ -4,10 +4,10 @@ fun test1(d: dynamic): dynamic { fun test2(d: dynamic): dynamic { return { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.member(1, 2, 3) + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.member(1, 2, 3) } } } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt deleted file mode 100644 index 6af5e2bd87b..00000000000 --- a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.ir.txt +++ /dev/null @@ -1,17 +0,0 @@ -FILE fqName: fileName:/dynamicElvisOperator.kt - FUN name:test visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic - VALUE_PARAMETER name:d index:0 type:dynamic - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (d: dynamic): dynamic declared in ' - BLOCK type=dynamic origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:dynamic [val] - GET_VAR 'd: dynamic declared in .test' type=dynamic origin=null - WHEN type=dynamic origin=null - 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: dynamic declared in .test' type=dynamic origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST String type=kotlin.String value="other" - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_0: dynamic declared in .test' type=dynamic origin=null diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.kt.txt deleted file mode 100644 index f77173054ba..00000000000 --- a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.fir.kt.txt +++ /dev/null @@ -1,10 +0,0 @@ -fun test(d: dynamic): dynamic { - return { // BLOCK - val : dynamic = d - when { - EQEQ(arg0 = , arg1 = null) -> "other" - else -> - } - } -} - diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt index 68b9b2964c0..f551d2f0c47 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt @@ -1,2 +1,3 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JS_IR fun test(d: dynamic) = d ?: "other" diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt.txt index 25b1689fa36..13ef7acb18d 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicElvisOperator.kt.txt @@ -1,9 +1,9 @@ fun test(d: dynamic): dynamic { return { // BLOCK - val tmp0_elvis_lhs: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> "other" - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> "other" + else -> tmp_0 } } } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt.txt index 61b0fd458b7..1c74add5259 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAccess.kt.txt @@ -4,10 +4,10 @@ fun test1(d: dynamic): dynamic { fun test2(d: dynamic): dynamic { return { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.member + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.member } } } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.fir.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.fir.kt.txt index 423f93f656c..d02f01b6b85 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.fir.kt.txt @@ -4,10 +4,10 @@ fun testMemberAssignment(d: dynamic) { fun testSafeMemberAssignment(d: dynamic) { { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.m = 1 + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.m = 1 } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt.txt index 2a1cbe408a3..7e3b485d4c5 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAssignment.kt.txt @@ -4,10 +4,10 @@ fun testMemberAssignment(d: dynamic) { fun testSafeMemberAssignment(d: dynamic) { { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp0_safe_receiver.m = 1 + EQEQ(arg0 = tmp_0, arg1 = null) -> null /*~> Unit */ + else -> tmp_0.m = 1 } } } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.fir.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.fir.kt.txt index 923db22041f..780cd706042 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.fir.kt.txt @@ -8,38 +8,38 @@ fun testAugmentedMemberAssignment(d: dynamic) { fun testSafeAugmentedMemberAssignment(d: dynamic) { { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.m += "+=" + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.m += "+=" } } /*~> Unit */ { // BLOCK - val tmp1_safe_receiver: dynamic = d + val tmp_1: dynamic = d when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> tmp1_safe_receiver.m -= "-=" + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> tmp_1.m -= "-=" } } /*~> Unit */ { // BLOCK - val tmp2_safe_receiver: dynamic = d + val tmp_2: dynamic = d when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.m *= "*=" + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.m *= "*=" } } /*~> Unit */ { // BLOCK - val tmp3_safe_receiver: dynamic = d + val tmp_3: dynamic = d when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null - else -> tmp3_safe_receiver.m /= "/=" + EQEQ(arg0 = tmp_3, arg1 = null) -> null + else -> tmp_3.m /= "/=" } } /*~> Unit */ { // BLOCK - val tmp4_safe_receiver: dynamic = d + val tmp_4: dynamic = d when { - EQEQ(arg0 = tmp4_safe_receiver, arg1 = null) -> null - else -> tmp4_safe_receiver.m %= "%=" + EQEQ(arg0 = tmp_4, arg1 = null) -> null + else -> tmp_4.m %= "%=" } } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt.txt index 8fffb5a3160..2d3df069103 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberAugmentedAssignment.kt.txt @@ -8,38 +8,38 @@ fun testAugmentedMemberAssignment(d: dynamic) { fun testSafeAugmentedMemberAssignment(d: dynamic) { { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp0_safe_receiver.m += "+=" + EQEQ(arg0 = tmp_0, arg1 = null) -> null /*~> Unit */ + else -> tmp_0.m += "+=" } } { // BLOCK - val tmp1_safe_receiver: dynamic = d + val tmp_1: dynamic = d when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp1_safe_receiver.m -= "-=" + EQEQ(arg0 = tmp_1, arg1 = null) -> null /*~> Unit */ + else -> tmp_1.m -= "-=" } } { // BLOCK - val tmp2_safe_receiver: dynamic = d + val tmp_2: dynamic = d when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp2_safe_receiver.m *= "*=" + EQEQ(arg0 = tmp_2, arg1 = null) -> null /*~> Unit */ + else -> tmp_2.m *= "*=" } } { // BLOCK - val tmp3_safe_receiver: dynamic = d + val tmp_3: dynamic = d when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp3_safe_receiver.m /= "/=" + EQEQ(arg0 = tmp_3, arg1 = null) -> null /*~> Unit */ + else -> tmp_3.m /= "/=" } } { // BLOCK - val tmp4_safe_receiver: dynamic = d + val tmp_4: dynamic = d when { - EQEQ(arg0 = tmp4_safe_receiver, arg1 = null) -> null /*~> Unit */ - else -> tmp4_safe_receiver.m %= "%=" + EQEQ(arg0 = tmp_4, arg1 = null) -> null /*~> Unit */ + else -> tmp_4.m %= "%=" } } } diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt.txt index 97815c0b0de..ec067dd3f1e 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.kt.txt @@ -7,31 +7,31 @@ fun testMemberIncrementDecrement(d: dynamic) { fun testSafeMemberIncrementDecrement(d: dynamic) { val t1: dynamic = { // BLOCK - val tmp0_safe_receiver: dynamic = d + val tmp_0: dynamic = d when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> ++tmp0_safe_receiver.prefixIncr + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> ++tmp_0.prefixIncr } } val t2: dynamic = { // BLOCK - val tmp1_safe_receiver: dynamic = d + val tmp_1: dynamic = d when { - EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null - else -> --tmp1_safe_receiver.prefixDecr + EQEQ(arg0 = tmp_1, arg1 = null) -> null + else -> --tmp_1.prefixDecr } } val t3: dynamic = { // BLOCK - val tmp2_safe_receiver: dynamic = d + val tmp_2: dynamic = d when { - EQEQ(arg0 = tmp2_safe_receiver, arg1 = null) -> null - else -> tmp2_safe_receiver.postfixIncr++ + EQEQ(arg0 = tmp_2, arg1 = null) -> null + else -> tmp_2.postfixIncr++ } } val t4: dynamic = { // BLOCK - val tmp3_safe_receiver: dynamic = d + val tmp_3: dynamic = d when { - EQEQ(arg0 = tmp3_safe_receiver, arg1 = null) -> null - else -> tmp3_safe_receiver.postfixDecr-- + EQEQ(arg0 = tmp_3, arg1 = null) -> null + else -> tmp_3.postfixDecr-- } } } diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt index 7a8fce2c676..2f18b011fbc 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.fir.kt.txt @@ -42,12 +42,12 @@ data class A { when { other !is A -> return false } - val tmp0_other_with_cast: A = other as A + val tmp_0: A = other as A when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_0.#y).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt index 96b6b916daa..d50c571c8fd 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt @@ -42,12 +42,12 @@ data class A { when { other !is A -> return false } - val tmp0_other_with_cast: A = other as A + val tmp_0: A = other as A when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_0.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_0.#y).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt b/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt index 4f154b37814..6e681e08756 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt @@ -2,9 +2,9 @@ fun outer() { var x: Int = 0 local fun local() { { // BLOCK - val : Int = x - x = .inc() - + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/lambdas/localFunction.kt.txt b/compiler/testData/ir/irText/lambdas/localFunction.kt.txt index b2701e118e6..00e1b57c0a0 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.kt.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.kt.txt @@ -2,9 +2,9 @@ fun outer() { var x: Int = 0 local fun local() { { // BLOCK - val tmp0: Int = x - x = tmp0.inc() - tmp0 + val tmp_0: Int = x + x = tmp_0.inc() + tmp_0 } /*~> Unit */ } diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt index 19064af1694..704c147c204 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt @@ -7,9 +7,9 @@ fun box(): String { ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i } { // BLOCK - val : Int = i - i = .inc() - + val tmp_0: Int = i + i = tmp_0.inc() + tmp_0 } } return "OK" diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt index effae5b4f19..84756c13aa0 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt @@ -7,9 +7,9 @@ fun box(): String { ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i } { // BLOCK - val tmp0: Int = i - i = tmp0.inc() - tmp0 + val tmp_0: Int = i + i = tmp_0.inc() + tmp_0 } /*~> Unit */ } return "OK" diff --git a/compiler/testData/ir/irText/regressions/kt24114.fir.ir.txt b/compiler/testData/ir/irText/regressions/kt24114.fir.ir.txt deleted file mode 100644 index a608644a446..00000000000 --- a/compiler/testData/ir/irText/regressions/kt24114.fir.ir.txt +++ /dev/null @@ -1,64 +0,0 @@ -FILE fqName: fileName:/kt24114.kt - FUN name:one visibility:public modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun one (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=1 - FUN name:two visibility:public modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun two (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=2 - FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=true - body: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - CALL 'public final fun one (): kotlin.Int declared in ' 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 .test1' 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=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - CALL 'public final fun two (): kotlin.Int declared in ' 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 .test1' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=2 - then: RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=2 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: RETURN type=kotlin.Nothing from='public final fun test1 (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=3 - FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Int - BLOCK_BODY - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=true - body: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - CALL 'public final fun one (): kotlin.Int declared in ' 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 .test2' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun two (): kotlin.Int declared in ' 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 .test2' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=2 - then: RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=2 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: RETURN type=kotlin.Nothing from='public final fun test2 (): kotlin.Int declared in ' - CONST Int type=kotlin.Int value=3 diff --git a/compiler/testData/ir/irText/regressions/kt24114.fir.kt.txt b/compiler/testData/ir/irText/regressions/kt24114.fir.kt.txt deleted file mode 100644 index bfa4f4bd859..00000000000 --- a/compiler/testData/ir/irText/regressions/kt24114.fir.kt.txt +++ /dev/null @@ -1,44 +0,0 @@ -fun one(): Int { - return 1 -} - -fun two(): Int { - return 2 -} - -fun test1(): Int { - while (true) { // BLOCK - { // BLOCK - val tmp0_subject: Int = one() - when { - EQEQ(arg0 = tmp0_subject, arg1 = 1) -> { // BLOCK - { // BLOCK - val tmp1_subject: Int = two() - when { - EQEQ(arg0 = tmp1_subject, arg1 = 2) -> return 2 - } - } - } - else -> return 3 - } - } - } -} - -fun test2(): Int { - while (true) { // BLOCK - { // BLOCK - val tmp2_subject: Int = one() - when { - EQEQ(arg0 = tmp2_subject, arg1 = 1) -> { // BLOCK - val tmp3_subject: Int = two() - when { - EQEQ(arg0 = tmp3_subject, arg1 = 2) -> return 2 - } - } - else -> return 3 - } - } - } -} - diff --git a/compiler/testData/ir/irText/regressions/kt24114.kt b/compiler/testData/ir/irText/regressions/kt24114.kt index 9a9c944d70f..e1f16197a33 100644 --- a/compiler/testData/ir/irText/regressions/kt24114.kt +++ b/compiler/testData/ir/irText/regressions/kt24114.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun one() = 1 fun two() = 2 diff --git a/compiler/testData/ir/irText/regressions/kt24114.kt.txt b/compiler/testData/ir/irText/regressions/kt24114.kt.txt index 7427e04f3f1..37ec87fc19c 100644 --- a/compiler/testData/ir/irText/regressions/kt24114.kt.txt +++ b/compiler/testData/ir/irText/regressions/kt24114.kt.txt @@ -9,13 +9,13 @@ fun two(): Int { fun test1(): Int { while (true) { // BLOCK { // BLOCK - val tmp0_subject: Int = one() + val tmp_0: Int = one() when { - EQEQ(arg0 = tmp0_subject, arg1 = 1) -> { // BLOCK + EQEQ(arg0 = tmp_0, arg1 = 1) -> { // BLOCK { // BLOCK - val tmp1_subject: Int = two() + val tmp_1: Int = two() when { - EQEQ(arg0 = tmp1_subject, arg1 = 2) -> return 2 + EQEQ(arg0 = tmp_1, arg1 = 2) -> return 2 } } } @@ -28,12 +28,12 @@ fun test1(): Int { fun test2(): Int { while (true) { // BLOCK { // BLOCK - val tmp0_subject: Int = one() + val tmp_2: Int = one() when { - EQEQ(arg0 = tmp0_subject, arg1 = 1) -> { // BLOCK - val tmp1_subject: Int = two() + EQEQ(arg0 = tmp_2, arg1 = 1) -> { // BLOCK + val tmp_3: Int = two() when { - EQEQ(arg0 = tmp1_subject, arg1 = 2) -> return 2 + EQEQ(arg0 = tmp_3, arg1 = 2) -> return 2 } } else -> return 3 diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.kt.txt index a7b83133498..13640b8d427 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.fir.kt.txt @@ -39,10 +39,10 @@ private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { val channel: ChannelCoroutine = $this$produce.() as ChannelCoroutine flow.collect(action = local suspend fun (value: @ParameterName(name = "value") Any?) { return channel.sendFair(element = { // BLOCK - val : @ParameterName(name = "value") Any? = value + val tmp_0: @ParameterName(name = "value") Any? = value when { - EQEQ(arg0 = , arg1 = null) -> Any() - else -> + EQEQ(arg0 = tmp_0, arg1 = null) -> Any() + else -> tmp_0 } }) } @@ -55,10 +55,10 @@ private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel { return .produce(block = local suspend fun ProducerScope.() { flow.collect(action = local suspend fun (value: @ParameterName(name = "value") Any?) { return $this$produce.().send(e = { // BLOCK - val : @ParameterName(name = "value") Any? = value + val tmp_1: @ParameterName(name = "value") Any? = value when { - EQEQ(arg0 = , arg1 = null) -> Any() - else -> + EQEQ(arg0 = tmp_1, arg1 = null) -> Any() + else -> tmp_1 } }) } diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt index 4f7582444dc..ed428206c89 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt @@ -39,10 +39,10 @@ private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { val channel: ChannelCoroutine = $this$produce.() as ChannelCoroutine flow.collect(action = local suspend fun (value: Any?) { return channel.sendFair(element = { // BLOCK - val tmp0_elvis_lhs: Any? = value + val tmp_0: Any? = value when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> Any() - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> Any() + else -> tmp_0 } }) } @@ -55,10 +55,10 @@ private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel { return .produce(block = local suspend fun ProducerScope.() { flow.collect(action = local suspend fun (value: Any?) { return $this$produce.().send(e = { // BLOCK - val tmp0_elvis_lhs: Any? = value + val tmp_1: Any? = value when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> Any() - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_1, arg1 = null) -> Any() + else -> tmp_1 } }) } diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt b/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt deleted file mode 100644 index e13ced597cb..00000000000 --- a/compiler/testData/ir/irText/types/definitelyNonNull.fir.ir.txt +++ /dev/null @@ -1,45 +0,0 @@ -FILE fqName: fileName:/definitelyNonNull.kt - FUN name:elvisLike visibility:public modality:FINAL (x:T of .elvisLike, y:{T of .elvisLike & Any}) returnType:{T of .elvisLike & Any} - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:x index:0 type:T of .elvisLike - VALUE_PARAMETER name:y index:1 type:{T of .elvisLike & Any} - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun elvisLike (x: T of .elvisLike, y: {T of .elvisLike & Any}): {T of .elvisLike & Any} declared in ' - BLOCK type={T of .elvisLike & Any} origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:T of .elvisLike [val] - GET_VAR 'x: T of .elvisLike declared in .elvisLike' type=T of .elvisLike origin=null - WHEN type={T of .elvisLike & Any} origin=null - 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: T of .elvisLike declared in .elvisLike' type=T of .elvisLike origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: GET_VAR 'y: {T of .elvisLike & Any} declared in .elvisLike' type={T of .elvisLike & Any} origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_0: T of .elvisLike declared in .elvisLike' type=T of .elvisLike origin=null - FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: CALL 'public final fun elvisLike (x: T of .elvisLike, y: {T of .elvisLike & Any}): {T of .elvisLike & Any} declared in ' type=kotlin.String origin=null - : kotlin.String - x: CONST String type=kotlin.String value="" - y: CONST String type=kotlin.String value="" - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: CALL 'public final fun elvisLike (x: T of .elvisLike, y: {T of .elvisLike & Any}): {T of .elvisLike & Any} declared in ' type=kotlin.String origin=null - : kotlin.String? - x: CONST Null type=kotlin.Nothing? value=null - y: CONST String type=kotlin.String value="" - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: CALL 'public final fun elvisLike (x: T of .elvisLike, y: {T of .elvisLike & Any}): {T of .elvisLike & Any} declared in ' type=kotlin.String origin=null - : kotlin.String - x: CONST String type=kotlin.String value="" - y: CONST String type=kotlin.String value="" - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public open fun (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=GET_PROPERTY - $this: CALL 'public final fun elvisLike (x: T of .elvisLike, y: {T of .elvisLike & Any}): {T of .elvisLike & Any} declared in ' type=kotlin.String origin=null - : kotlin.String? - x: CONST Null type=kotlin.Nothing? value=null - y: CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.fir.kt.txt b/compiler/testData/ir/irText/types/definitelyNonNull.fir.kt.txt deleted file mode 100644 index d44e7ccd752..00000000000 --- a/compiler/testData/ir/irText/types/definitelyNonNull.fir.kt.txt +++ /dev/null @@ -1,17 +0,0 @@ -fun elvisLike(x: T, y: (T & Any)): (T & Any) { - return { // BLOCK - val : T = x - when { - EQEQ(arg0 = , arg1 = null) -> y - else -> - } - } -} - -fun main() { - elvisLike(x = "", y = "").() /*~> Unit */ - elvisLike(x = null, y = "").() /*~> Unit */ - elvisLike(x = "", y = "").() /*~> Unit */ - elvisLike(x = null, y = "").() /*~> Unit */ -} - diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.kt b/compiler/testData/ir/irText/types/definitelyNonNull.kt index 4d4dda2412a..9e52a3b8688 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.kt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL //!LANGUAGE: +DefinitelyNonNullableTypes // MUTE_SIGNATURE_COMPARISON_K2: JVM_IR diff --git a/compiler/testData/ir/irText/types/definitelyNonNull.kt.txt b/compiler/testData/ir/irText/types/definitelyNonNull.kt.txt index 1cc505bc050..97d4b886296 100644 --- a/compiler/testData/ir/irText/types/definitelyNonNull.kt.txt +++ b/compiler/testData/ir/irText/types/definitelyNonNull.kt.txt @@ -1,9 +1,9 @@ fun elvisLike(x: T, y: (T & Any)): (T & Any) { return { // BLOCK - val tmp0_elvis_lhs: T = x + val tmp_0: T = x when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> y - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> y + else -> tmp_0 } } } diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt index 5722b73d39f..7c0bbd60d6e 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.fir.kt.txt @@ -52,16 +52,16 @@ class Q { } fun test1() { - val : P = notNullP() /*!! P */ - val x: Int = .component1() - val y: Int = .component2() + val tmp_0: P = notNullP() /*!! P */ + val x: Int = tmp_0.component1() + val y: Int = tmp_0.component2() use(x = x, y = y) } fun test2() { - val : @FlexibleNullability Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String>? = notNullComponents() - val x: @EnhancedNullability @NotNull String = .component1() /*!! @NotNull String */ - val y: @EnhancedNullability @NotNull String = .component2() /*!! @NotNull String */ + val tmp_1: @FlexibleNullability Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String>? = notNullComponents() + val x: @EnhancedNullability @NotNull String = tmp_1.component1() /*!! @NotNull String */ + val y: @EnhancedNullability @NotNull String = tmp_1.component2() /*!! @NotNull String */ use(x = x, y = y) } @@ -73,16 +73,16 @@ fun test2Desugared() { } fun test3() { - val : Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> = notNullQAndComponents() /*!! Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> */ - val x: @EnhancedNullability @NotNull String = .component1() /*!! @NotNull String */ - val y: @EnhancedNullability @NotNull String = .component2() /*!! @NotNull String */ + val tmp_2: Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> = notNullQAndComponents() /*!! Q<@EnhancedNullability @NotNull String, @EnhancedNullability @NotNull String> */ + val x: @EnhancedNullability @NotNull String = tmp_2.component1() /*!! @NotNull String */ + val y: @EnhancedNullability @NotNull String = tmp_2.component2() /*!! @NotNull String */ use(x = x, y = y) } fun test4() { - val : IndexedValue<@EnhancedNullability @NotNull P> = listOfNotNull() /*!! @FlexibleMutability MutableList<@EnhancedNullability @NotNull P> */.withIndex<@EnhancedNullability @NotNull P>().first>() - val x: Int = .component1() - val y: @EnhancedNullability @NotNull P = .component2() /*!! @NotNull P */ + val tmp_3: IndexedValue<@EnhancedNullability @NotNull P> = listOfNotNull() /*!! @FlexibleMutability MutableList<@EnhancedNullability @NotNull P> */.withIndex<@EnhancedNullability @NotNull P>().first>() + val x: Int = tmp_3.component1() + val y: @EnhancedNullability @NotNull P = tmp_3.component2() /*!! @NotNull P */ use(x = x, y = y) } diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt.txt index 909ba08d9f8..b73fe116297 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInDestructuringAssignment.kt.txt @@ -53,18 +53,18 @@ class Q { fun test1() { // COMPOSITE { - val tmp0_container: @EnhancedNullability P = notNullP() - val x: Int = tmp0_container /*!! P */.component1() - val y: Int = tmp0_container /*!! P */.component2() + val tmp_0: @EnhancedNullability P = notNullP() + val x: Int = tmp_0 /*!! P */.component1() + val y: Int = tmp_0 /*!! P */.component2() // } use(x = x, y = y) } fun test2() { // COMPOSITE { - val tmp0_container: @FlexibleNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String>? = notNullComponents() - val x: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1() - val y: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2() + val tmp_1: @FlexibleNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String>? = notNullComponents() + val x: @NotNull @EnhancedNullability String = tmp_1 /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1() + val y: @NotNull @EnhancedNullability String = tmp_1 /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2() // } use(x = x /*!! @NotNull String */, y = y /*!! @NotNull String */) } @@ -78,18 +78,18 @@ fun test2Desugared() { fun test3() { // COMPOSITE { - val tmp0_container: @EnhancedNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> = notNullQAndComponents() - val x: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1() - val y: @NotNull @EnhancedNullability String = tmp0_container /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2() + val tmp_2: @EnhancedNullability Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> = notNullQAndComponents() + val x: @NotNull @EnhancedNullability String = tmp_2 /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component1() + val y: @NotNull @EnhancedNullability String = tmp_2 /*!! Q<@NotNull @EnhancedNullability String, @NotNull @EnhancedNullability String> */.component2() // } use(x = x /*!! @NotNull String */, y = y /*!! @NotNull String */) } fun test4() { // COMPOSITE { - val tmp0_container: IndexedValue<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */.withIndex<@NotNull @EnhancedNullability P>().first>() - val x: Int = tmp0_container.component1() - val y: @NotNull @EnhancedNullability P = tmp0_container.component2() + val tmp_3: IndexedValue<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */.withIndex<@NotNull @EnhancedNullability P>().first>() + val x: Int = tmp_3.component1() + val y: @NotNull @EnhancedNullability P = tmp_3.component2() // } use(x = x, y = y /*!! @NotNull P */) } diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt index d6d0808f3c7..b6f8309c0a7 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.fir.kt.txt @@ -3,9 +3,9 @@ fun use(s: P) { fun testForInListUnused() { { // BLOCK - val : MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() - while (.hasNext()) { // BLOCK - val x: @NotNull P = .next() /*!! @NotNull P */ + val tmp_0: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() + while (tmp_0.hasNext()) { // BLOCK + val x: @NotNull P = tmp_0.next() /*!! @NotNull P */ { // BLOCK } } @@ -14,11 +14,11 @@ fun testForInListUnused() { fun testForInListDestructured() { { // BLOCK - val : MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() - while (.hasNext()) { // BLOCK - val : @NotNull P = .next() /*!! @NotNull P */ - val x: Int = .component1() - val y: Int = .component2() + val tmp_1: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() + while (tmp_1.hasNext()) { // BLOCK + val tmp_2: @NotNull P = tmp_1.next() /*!! @NotNull P */ + val x: Int = tmp_2.component1() + val y: Int = tmp_2.component2() { // BLOCK } } @@ -34,9 +34,9 @@ fun testDesugaredForInList() { fun testForInArrayUnused(j: J) { { // BLOCK - val : Iterator<@EnhancedNullability P> = j.arrayOfNotNull().iterator() - while (.hasNext()) { // BLOCK - val x: P = .next() /*!! P */ + val tmp_3: Iterator<@EnhancedNullability P> = j.arrayOfNotNull().iterator() + while (tmp_3.hasNext()) { // BLOCK + val x: P = tmp_3.next() /*!! P */ { // BLOCK } } @@ -45,9 +45,9 @@ fun testForInArrayUnused(j: J) { fun testForInListUse() { { // BLOCK - val : MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() - while (.hasNext()) { // BLOCK - val x: @NotNull P = .next() /*!! @NotNull P */ + val tmp_4: MutableIterator<@EnhancedNullability @NotNull P> = listOfNotNull().iterator() + while (tmp_4.hasNext()) { // BLOCK + val x: @NotNull P = tmp_4.next() /*!! @NotNull P */ { // BLOCK use(s = x) use(s = x) @@ -58,9 +58,9 @@ fun testForInListUse() { fun testForInArrayUse(j: J) { { // BLOCK - val : Iterator<@EnhancedNullability P> = j.arrayOfNotNull().iterator() - while (.hasNext()) { // BLOCK - val x: P = .next() /*!! P */ + val tmp_5: Iterator<@EnhancedNullability P> = j.arrayOfNotNull().iterator() + while (tmp_5.hasNext()) { // BLOCK + val x: P = tmp_5.next() /*!! P */ { // BLOCK use(s = x) use(s = x) @@ -118,12 +118,12 @@ data class P { when { other !is P -> return false } - val tmp0_other_with_cast: P = other as P + val tmp_6: P = other as P when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_6.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_6.#y).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt index 43843719961..716bc85ac8c 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt @@ -3,9 +3,9 @@ fun use(s: P) { fun testForInListUnused() { { // BLOCK - val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: @NotNull @EnhancedNullability P = tmp0_iterator.next() + val tmp_0: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() + while (tmp_0.hasNext()) { // BLOCK + val x: @NotNull @EnhancedNullability P = tmp_0.next() { // BLOCK } } @@ -14,11 +14,11 @@ fun testForInListUnused() { fun testForInListDestructured() { { // BLOCK - val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val tmp1_loop_parameter: @NotNull @EnhancedNullability P = tmp0_iterator.next() - val x: Int = tmp1_loop_parameter /*!! @NotNull P */.component1() - val y: Int = tmp1_loop_parameter /*!! @NotNull P */.component2() + val tmp_1: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() + while (tmp_1.hasNext()) { // BLOCK + val tmp_2: @NotNull @EnhancedNullability P = tmp_1.next() + val x: Int = tmp_2 /*!! @NotNull P */.component1() + val y: Int = tmp_2 /*!! @NotNull P */.component2() { // BLOCK } } @@ -34,9 +34,9 @@ fun testDesugaredForInList() { fun testForInArrayUnused(j: J) { { // BLOCK - val tmp0_iterator: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array */ /*as Array<@EnhancedNullability P> */.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: @EnhancedNullability P = tmp0_iterator.next() + val tmp_3: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array */ /*as Array<@EnhancedNullability P> */.iterator() + while (tmp_3.hasNext()) { // BLOCK + val x: @EnhancedNullability P = tmp_3.next() { // BLOCK } } @@ -45,9 +45,9 @@ fun testForInArrayUnused(j: J) { fun testForInListUse() { { // BLOCK - val tmp0_iterator: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: @NotNull @EnhancedNullability P = tmp0_iterator.next() + val tmp_4: MutableIterator<@NotNull @EnhancedNullability P> = listOfNotNull() /*!! List<@NotNull @EnhancedNullability P> */ /*as MutableList<*> */.iterator() + while (tmp_4.hasNext()) { // BLOCK + val x: @NotNull @EnhancedNullability P = tmp_4.next() { // BLOCK use(s = x /*!! @NotNull P */) use(s = x) @@ -58,9 +58,9 @@ fun testForInListUse() { fun testForInArrayUse(j: J) { { // BLOCK - val tmp0_iterator: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array */ /*as Array<@EnhancedNullability P> */.iterator() - while (tmp0_iterator.hasNext()) { // BLOCK - val x: @EnhancedNullability P = tmp0_iterator.next() + val tmp_5: Iterator<@EnhancedNullability P> = j.arrayOfNotNull() /*!! Array */ /*as Array<@EnhancedNullability P> */.iterator() + while (tmp_5.hasNext()) { // BLOCK + val x: @EnhancedNullability P = tmp_5.next() { // BLOCK use(s = x /*!! P */) use(s = x) @@ -118,12 +118,12 @@ data class P { when { other !is P -> return false } - val tmp0_other_with_cast: P = other as P + val tmp_6: P = other as P when { - EQEQ(arg0 = .#x, arg1 = tmp0_other_with_cast.#x).not() -> return false + EQEQ(arg0 = .#x, arg1 = tmp_6.#x).not() -> return false } when { - EQEQ(arg0 = .#y, arg1 = tmp0_other_with_cast.#y).not() -> return false + EQEQ(arg0 = .#y, arg1 = tmp_6.#y).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt deleted file mode 100644 index 96804e4dc49..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.ir.txt +++ /dev/null @@ -1,23 +0,0 @@ -Module: lib -Module: main -FILE fqName: fileName:/nullCheckInElvisRhs.kt - FUN name:baz visibility:public modality:FINAL <> () returnType:kotlin.String? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun baz (): kotlin.String? declared in ' - CONST Null type=kotlin.Nothing? value=null - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun test (): kotlin.String declared in ' - BLOCK type=kotlin.String origin=ELVIS - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String? [val] - CALL 'public final fun baz (): kotlin.String? declared in ' type=kotlin.String? origin=null - WHEN type=kotlin.String origin=null - 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.String? declared in .test' type=kotlin.String? origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL 'public/*package*/ open fun foo (): @[FlexibleNullability] kotlin.String? declared in .RightElvisOperand' type=@[FlexibleNullability] kotlin.String? origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val tmp_0: kotlin.String? declared in .test' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.kt.txt deleted file mode 100644 index 8851a704d19..00000000000 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.fir.kt.txt +++ /dev/null @@ -1,17 +0,0 @@ -// MODULE: lib -// MODULE: main -// FILE: nullCheckInElvisRhs.kt - -fun baz(): String? { - return null -} - -fun test(): String { - return { // BLOCK - val : String? = baz() - when { - EQEQ(arg0 = , arg1 = null) -> foo() /*!! String */ - else -> - } - } -} diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt index f35e9d4c3fe..6c4abb7c55e 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // MODULE: lib diff --git a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt.txt b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt.txt index db7a7782a44..18a921198c6 100644 --- a/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/nullCheckInElvisRhs.kt.txt @@ -8,10 +8,10 @@ fun baz(): String? { fun test(): String { return { // BLOCK - val tmp0_elvis_lhs: String? = baz() + val tmp_0: String? = baz() when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> foo() /*!! String */ - else -> tmp0_elvis_lhs + EQEQ(arg0 = tmp_0, arg1 = null) -> foo() /*!! String */ + else -> tmp_0 } } } diff --git a/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.fir.kt.txt b/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.fir.kt.txt index 390331de46e..03224b20742 100644 --- a/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.fir.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.fir.kt.txt @@ -1,9 +1,9 @@ fun f(x: T): Int? where T : CharSequence?, T : Comparable? { return { // BLOCK - val tmp0_safe_receiver: T = x + val tmp_0: T = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.compareTo(other = x) + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.compareTo(other = x) } } } diff --git a/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.kt.txt b/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.kt.txt index 88ff355a728..554f471270c 100644 --- a/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/typeParameterWithMultipleNullableBounds.kt.txt @@ -1,9 +1,9 @@ fun f(x: T): Int? where T : CharSequence?, T : Comparable? { return { // BLOCK - val tmp0_safe_receiver: T = x + val tmp_0: T = x when { - EQEQ(arg0 = tmp0_safe_receiver, arg1 = null) -> null - else -> tmp0_safe_receiver.compareTo(other = x) + EQEQ(arg0 = tmp_0, arg1 = null) -> null + else -> tmp_0.compareTo(other = x) } } } diff --git a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt index 0f4d65c2bd7..e866cc780f2 100644 --- a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt +++ b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.fir.kt.txt @@ -33,9 +33,9 @@ data class Tag { when { other !is Tag -> return false } - val tmp0_other_with_cast: Tag = other as Tag + val tmp_0: Tag = other as Tag when { - EQEQ(arg0 = .#action, arg1 = tmp0_other_with_cast.#action).not() -> return false + EQEQ(arg0 = .#action, arg1 = tmp_0.#action).not() -> return false } return true } diff --git a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt.txt b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt.txt index d62f18582aa..d84a9ee51d5 100644 --- a/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt.txt +++ b/compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt.txt @@ -33,9 +33,9 @@ data class Tag { when { other !is Tag -> return false } - val tmp0_other_with_cast: Tag = other as Tag + val tmp_0: Tag = other as Tag when { - EQEQ(arg0 = .#action, arg1 = tmp0_other_with_cast.#action).not() -> return false + EQEQ(arg0 = .#action, arg1 = tmp_0.#action).not() -> return false } return true } diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrPrettyKotlinDumpHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrPrettyKotlinDumpHandler.kt index b63a1ccf238..03b833de8a4 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrPrettyKotlinDumpHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/backend/handlers/IrPrettyKotlinDumpHandler.kt @@ -51,6 +51,7 @@ class IrPrettyKotlinDumpHandler( KotlinLikeDumpOptions( printFilePath = false, printFakeOverridesStrategy = FakeOverridesStrategy.NONE, + normalizeNames = true, // KT-61983: K1 and K2 kotlin-like dumps are closer to each other when tempvar names are normalized ), ) }