diff --git a/analysis/analysis-api/testData/referenceResolve/arrayAccess/SetOperatorInc.txt b/analysis/analysis-api/testData/referenceResolve/arrayAccess/SetOperatorInc.txt index 78de5689c78..33cb993cfa7 100644 --- a/analysis/analysis-api/testData/referenceResolve/arrayAccess/SetOperatorInc.txt +++ b/analysis/analysis-api/testData/referenceResolve/arrayAccess/SetOperatorInc.txt @@ -1,2 +1,2 @@ Resolved to: -0: (in test.B) operator fun set(i: kotlin.Int, a: test.B) +0: (in test.B) operator fun get(i: kotlin.Int): test.B \ No newline at end of file diff --git a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FirElementsRecorder.kt b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FirElementsRecorder.kt index f453c07b34b..2194c8b329f 100644 --- a/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FirElementsRecorder.kt +++ b/analysis/low-level-api-fir/src/org/jetbrains/kotlin/analysis/low/level/api/fir/file/structure/FirElementsRecorder.kt @@ -125,8 +125,6 @@ internal open class FirElementsRecorder : FirVisitor fir.isWriteInCompoundCall() parentPsi is KtBinaryExpression && psi == parentPsi.left -> fir.isReadInCompoundCall() diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention.txt index be51c38ccda..28fe1feadb6 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention.txt @@ -1,6 +1,6 @@ KT element: KtPostfixExpression FIR element: FirFunctionCallImpl -FIR source kind: DesugaredIncrementOrDecrement +FIR source kind: DesugaredPostfixInc FIR element rendered: R|/|.R|SubstitutionOverride|(R|/|, R|/|.R|/A.inc|()) diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention_set.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention_set.txt index aa3e437d020..25fd7652025 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention_set.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/incWithArrayAccessConvention_set.txt @@ -1,9 +1,9 @@ KT element: KtArrayAccessExpression -FIR element: FirResolvedNamedReferenceImpl -FIR source kind: KtRealSourceElementKind +FIR element: FirFunctionCallImpl +FIR source kind: DesugaredPostfixInc FIR element rendered: -R|SubstitutionOverride| +R|/|.R|SubstitutionOverride|(R|/|) FIR FILE: FILE: [ResolvedTo(IMPORTS)] incWithArrayAccessConvention_set.kt diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperator.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperator.txt index 17db4302a80..132fe7c80c6 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperator.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperator.txt @@ -1,9 +1,9 @@ KT element: KtArrayAccessExpression -FIR element: FirResolvedNamedReferenceImpl -FIR source kind: KtRealSourceElementKind +FIR element: FirFunctionCallImpl +FIR source kind: DesugaredPostfixInc FIR element rendered: -R|test/B.set| +R|/|.R|test/B.get|(R|/|) FIR FILE: FILE: [ResolvedTo(IMPORTS)] setOperator.kt diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperatorScript.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperatorScript.txt index c91f19a6c66..ddf08ad9c3b 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperatorScript.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/calls/setOperatorScript.txt @@ -1,9 +1,9 @@ KT element: KtArrayAccessExpression -FIR element: FirResolvedNamedReferenceImpl -FIR source kind: KtRealSourceElementKind +FIR element: FirFunctionCallImpl +FIR source kind: DesugaredPostfixInc FIR element rendered: -R|test/B.set| +R|/|.R|test/B.get|(R|/|) FIR FILE: FILE: [ResolvedTo(IMPORTS)] setOperatorScript.kts diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpression.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpression.txt index ceff9ae4dd4..2294606cbc0 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpression.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpression.txt @@ -1,6 +1,6 @@ KT element: KtPostfixExpression FIR element: FirVariableAssignmentImpl -FIR source kind: DesugaredIncrementOrDecrement +FIR source kind: DesugaredPostfixInc FIR element rendered: R|/nextUnnamedLibraryIndex| = R|/|.R|kotlin/Int.inc|() diff --git a/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpressionScript.txt b/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpressionScript.txt index db9b1b082cd..441d0f22cd5 100644 --- a/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpressionScript.txt +++ b/analysis/low-level-api-fir/testData/getOrBuildFir/expressions/incExpressionScript.txt @@ -1,6 +1,6 @@ KT element: KtPostfixExpression FIR element: FirVariableAssignmentImpl -FIR source kind: DesugaredIncrementOrDecrement +FIR source kind: DesugaredPostfixInc FIR element rendered: R|/nextUnnamedLibraryIndex| = R|/|.R|kotlin/Int.inc|() diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt index 7dbe3c1d817..cec2246c247 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/collectors/components/ErrorNodeDiagnosticCollectorComponent.kt @@ -162,7 +162,7 @@ class ErrorNodeDiagnosticCollectorComponent( } // Prefix inc/dec on array access will have two calls to .get(...), don't report for the second one. - if (source?.kind == KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) { + if (source?.kind is KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) { return } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index a3a01754728..eda5f379658 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -537,6 +537,12 @@ internal fun FirReference.statementOrigin(): IrStatementOrigin? = when (this) { source?.kind == KtFakeSourceElementKind.DesugaredForLoop && symbol.callableId.isIterator() -> IrStatementOrigin.FOR_LOOP_ITERATOR + source?.kind is KtFakeSourceElementKind.DesugaredIncrementOrDecrement -> + incOrDeclSourceKindToIrStatementOrigin[source?.kind] + + source?.kind is KtFakeSourceElementKind.DesugaredPrefixSecondGetReference -> + incOrDeclSourceKindToIrStatementOrigin[source?.kind] + source?.elementType == KtNodeTypes.OPERATION_REFERENCE -> nameToOperationConventionOrigin[symbol.callableId.callableName] @@ -750,12 +756,13 @@ private val PREFIX_POSTFIX_ORIGIN_MAP: Map IrStatementOrigin.FOR_LOOP is KtFakeSourceElementKind.DesugaredArrayAugmentedAssign -> augmentedArrayAssignSourceKindToIrStatementOrigin[expression.source?.kind] + is KtFakeSourceElementKind.DesugaredIncrementOrDecrement -> incOrDeclSourceKindToIrStatementOrigin[expression.source?.kind] else -> null } expression.convertToIrExpressionOrBlock(origin) @@ -1091,7 +1092,7 @@ class Fir2IrVisitor( } private fun FirBlock.convertToIrExpressionOrBlock(origin: IrStatementOrigin? = null): IrExpression { - if (this.source?.kind == KtFakeSourceElementKind.DesugaredIncrementOrDecrement) { + if (this.source?.kind is KtFakeSourceElementKind.DesugaredIncrementOrDecrement) { tryConvertDynamicIncrementOrDecrementToIr()?.let { return it } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index 1d32acb1854..d9ffc518979 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -319,17 +319,10 @@ class CallAndReferenceGenerator( else -> error("Unexpected name") } - is KtFakeSourceElementKind.DesugaredPrefixNameReference -> when (calleeReference.resolved?.name) { - OperatorNameConventions.INC -> IrDynamicOperator.PREFIX_INCREMENT - OperatorNameConventions.DEC -> IrDynamicOperator.PREFIX_DECREMENT - else -> error("Unexpected name") - } - - is KtFakeSourceElementKind.DesugaredPostfixNameReference -> when (calleeReference.resolved?.name) { - OperatorNameConventions.INC -> IrDynamicOperator.POSTFIX_INCREMENT - OperatorNameConventions.DEC -> IrDynamicOperator.POSTFIX_DECREMENT - else -> error("Unexpected name") - } + is KtFakeSourceElementKind.DesugaredPrefixInc -> IrDynamicOperator.PREFIX_INCREMENT + is KtFakeSourceElementKind.DesugaredPrefixDec -> IrDynamicOperator.PREFIX_DECREMENT + is KtFakeSourceElementKind.DesugaredPostfixInc -> IrDynamicOperator.POSTFIX_INCREMENT + is KtFakeSourceElementKind.DesugaredPostfixDec -> IrDynamicOperator.POSTFIX_DECREMENT is KtFakeSourceElementKind.DesugaredArrayAugmentedAssign -> when (calleeReference.resolved?.name) { OperatorNameConventions.SET -> IrDynamicOperator.EQ @@ -519,7 +512,8 @@ class CallAndReferenceGenerator( getterSymbol, typeArgumentsCount = property.typeParameters.size, valueArgumentsCount = property.contextReceivers.size, - origin = IrStatementOrigin.GET_PROPERTY, + origin = incOrDeclSourceKindToIrStatementOrigin[qualifiedAccess.source?.kind] + ?: IrStatementOrigin.GET_PROPERTY, superQualifierSymbol = dispatchReceiver?.superQualifierSymbol() ) } @@ -549,7 +543,7 @@ class CallAndReferenceGenerator( variable.irTypeForPotentiallyComponentCall(predefinedType = irType), symbol, origin = if (variableAsFunctionMode) IrStatementOrigin.VARIABLE_AS_FUNCTION - else calleeReference.statementOrigin() + else incOrDeclSourceKindToIrStatementOrigin[qualifiedAccess.source?.kind] ?: calleeReference.statementOrigin() ) } diff --git a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt index 6224372319f..3ae18f35f93 100644 --- a/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt +++ b/compiler/fir/raw-fir/raw-fir.common/src/org/jetbrains/kotlin/fir/builder/AbstractRawFirBuilder.kt @@ -660,11 +660,17 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context convert: T.() -> FirExpression, ): FirExpression { val array = receiver.arrayExpression + val isInc = when (callName) { + OperatorNameConventions.INC -> true + OperatorNameConventions.DEC -> false + else -> error("Unexpected operator: $callName") + } + val sourceKind = sourceKindForIncOrDec(callName, prefix) return buildBlockPossiblyUnderSafeCall( array, convert, receiver.toFirSourceElement(), ) { arrayReceiver -> val baseSource = wholeExpression?.toFirSourceElement() - val desugaredSource = baseSource?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement) + val desugaredSource = baseSource?.fakeElement(sourceKind) source = desugaredSource val indices = receiver.indexExpressions @@ -686,11 +692,12 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context ).also { statements += it } } - fun buildGetCall(referenceSourceKind: KtFakeSourceElementKind = KtFakeSourceElementKind.ArrayAccessNameReference) = + fun buildGetCall(sourceKind: KtFakeSourceElementKind) = buildFunctionCall { - source = desugaredSource + val fakeSource = receiver?.toFirSourceElement(sourceKind) + source = fakeSource calleeReference = buildSimpleNamedReference { - source = receiver?.toFirSourceElement(referenceSourceKind) + source = fakeSource name = OperatorNameConventions.GET } explicitReceiver = generateResolvedAccessExpression(arrayVariable.source, arrayVariable) @@ -702,10 +709,10 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context origin = FirFunctionCallOrigin.Operator } - fun buildSetCall(argumentExpression: FirExpression) = buildFunctionCall { + fun buildSetCall(argumentExpression: FirExpression, sourceElementKind: KtFakeSourceElementKind) = buildFunctionCall { source = desugaredSource calleeReference = buildSimpleNamedReference { - source = receiver.toFirSourceElement() + source = receiver.toFirSourceElement(sourceElementKind) name = OperatorNameConventions.SET } explicitReceiver = generateResolvedAccessExpression(arrayVariable.source, arrayVariable) @@ -731,29 +738,36 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context if (prefix) { statements += buildSetCall( buildIncDecCall( - KtFakeSourceElementKind.DesugaredPrefixNameReference, - buildGetCall() - ) + sourceKind, + buildGetCall(sourceKind), + ), + sourceKind + ) + statements += buildGetCall( + if (isInc) { + KtFakeSourceElementKind.DesugaredPrefixIncSecondGetReference + } else { + KtFakeSourceElementKind.DesugaredPrefixDecSecondGetReference + } ) - - statements += buildGetCall(KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) } else { val initialValueVar = generateTemporaryVariable( baseModuleData, desugaredSource, SpecialNames.UNARY, - buildGetCall() + buildGetCall(sourceKind) ) statements += initialValueVar statements += buildSetCall( buildIncDecCall( - KtFakeSourceElementKind.DesugaredPostfixNameReference, - generateResolvedAccessExpression(desugaredSource, initialValueVar) - ) + sourceKind, + generateResolvedAccessExpression(null, initialValueVar) + ), + sourceKind ) - statements += generateResolvedAccessExpression(desugaredSource, initialValueVar) + statements += generateResolvedAccessExpression(null, initialValueVar) } } } @@ -890,10 +904,10 @@ abstract class AbstractRawFirBuilder(val baseSession: FirSession, val context val assignmentLValue = unwrappedLhs.convert() return buildVariableAssignment { source = baseSource - lValue = if (baseSource?.kind == KtFakeSourceElementKind.DesugaredIncrementOrDecrement) { + lValue = if (baseSource?.kind is KtFakeSourceElementKind.DesugaredIncrementOrDecrement) { buildDesugaredAssignmentValueReferenceExpression { expressionRef = FirExpressionRef().apply { bind(assignmentLValue) } - source = assignmentLValue.source?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement) + source = assignmentLValue.source?.fakeElement(baseSource.kind as KtFakeSourceElementKind.DesugaredIncrementOrDecrement) } } else { assignmentLValue diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PreliminaryLoopVisitor.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PreliminaryLoopVisitor.kt index d6ba249e350..f082dd61c24 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PreliminaryLoopVisitor.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PreliminaryLoopVisitor.kt @@ -43,7 +43,7 @@ class PreliminaryLoopVisitor { } override fun visitVariableAssignment(variableAssignment: FirVariableAssignment, data: FirStatement?) { - if (variableAssignment.source?.kind == KtFakeSourceElementKind.DesugaredIncrementOrDecrement) return + if (variableAssignment.source?.kind is KtFakeSourceElementKind.DesugaredIncrementOrDecrement) return // Only care about local variable assignments, which never have explicit receivers. If this is a `var` // property assignment, the smart cast will be unstable anyway. diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt index 3f785c76b2b..8c36e5f3c21 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirExpressionsResolveTransformer.kt @@ -46,6 +46,7 @@ import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.name.StandardClassIds import org.jetbrains.kotlin.resolve.calls.inference.buildAbstractResultingSubstitutor +import org.jetbrains.kotlin.sourceKindForIncOrDec import org.jetbrains.kotlin.types.AbstractTypeChecker import org.jetbrains.kotlin.types.ConstantValueKind import org.jetbrains.kotlin.types.TypeApproximatorConfiguration @@ -727,6 +728,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT incrementDecrementExpression: FirIncrementDecrementExpression, data: ResolutionMode ): FirStatement { + val fakeSourceKind = sourceKindForIncOrDec(incrementDecrementExpression.operationName, incrementDecrementExpression.isPrefix) incrementDecrementExpression.transformAnnotations(transformer, ResolutionMode.ContextIndependent) val originalExpression = incrementDecrementExpression.expression.transformSingle(transformer, ResolutionMode.ContextIndependent) @@ -738,7 +740,10 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT else -> originalExpression } - val desugaredSource = incrementDecrementExpression.source?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement) + @OptIn(FirImplementationDetail::class) + if (expression is FirQualifiedAccessExpression) expression.replaceSource(expression.source?.fakeElement(fakeSourceKind)) + + val desugaredSource = incrementDecrementExpression.source?.fakeElement(fakeSourceKind) fun generateTemporaryVariable(name: Name, initializer: FirExpression): FirProperty = generateTemporaryVariable( moduleData = session.moduleData, @@ -748,15 +753,14 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT typeRef = initializer.resolvedType.toFirResolvedTypeRef(desugaredSource), ) - fun buildAndResolveOperatorCall(receiver: FirExpression): FirFunctionCall = buildFunctionCall { + fun buildAndResolveOperatorCall( + receiver: FirExpression, + fakeSourceKind: KtFakeSourceElementKind.DesugaredIncrementOrDecrement, + ): FirFunctionCall = buildFunctionCall { source = incrementDecrementExpression.operationSource explicitReceiver = receiver calleeReference = buildSimpleNamedReference { - val referenceSourceKind = when { - incrementDecrementExpression.isPrefix -> KtFakeSourceElementKind.DesugaredPrefixNameReference - else -> KtFakeSourceElementKind.DesugaredPostfixNameReference - } - source = incrementDecrementExpression.operationSource?.fakeElement(referenceSourceKind) + source = incrementDecrementExpression.operationSource?.fakeElement(fakeSourceKind) name = incrementDecrementExpression.operationName } origin = FirFunctionCallOrigin.Operator @@ -766,7 +770,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT source = desugaredSource lValue = buildDesugaredAssignmentValueReferenceExpression { source = ((expression as? FirErrorExpression)?.expression ?: expression).source - ?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement) + ?.fakeElement(fakeSourceKind) expressionRef = FirExpressionRef().apply { bind(expression.unwrapSmartcastExpression()) } } this.rValue = rValue @@ -781,11 +785,11 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT if (incrementDecrementExpression.isPrefix) { // a = a.inc() - statements += buildAndResolveVariableAssignment(buildAndResolveOperatorCall(expression)) + statements += buildAndResolveVariableAssignment(buildAndResolveOperatorCall(expression, fakeSourceKind)) // ^a statements += buildDesugaredAssignmentValueReferenceExpression { source = ((expression as? FirErrorExpression)?.expression ?: expression).source - ?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement) + ?.fakeElement(fakeSourceKind) expressionRef = FirExpressionRef().apply { bind(expression.unwrapSmartcastExpression()) } }.let { it.transform(transformer, ResolutionMode.ContextIndependent) @@ -797,7 +801,12 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT // val = a statements += unaryVariable // a = .inc() - statements += buildAndResolveVariableAssignment(buildAndResolveOperatorCall(unaryVariable.toQualifiedAccess())) + statements += buildAndResolveVariableAssignment( + buildAndResolveOperatorCall( + unaryVariable.toQualifiedAccess(), + fakeSourceKind + ) + ) // ^ statements += unaryVariable.toQualifiedAccess() } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt index 9a8cb777a87..bc7c40a8883 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirGeneration.kt @@ -96,8 +96,7 @@ fun generateExplicitReceiverTemporaryVariable( } ).also { property -> // Change the expression from x.a to .a - val newReceiverAccess = - property.toQualifiedAccess(fakeSource = receiver.source?.fakeElement(KtFakeSourceElementKind.DesugaredIncrementOrDecrement)) + val newReceiverAccess = property.toQualifiedAccess(fakeSource = receiver.source) if (expression.explicitReceiver == expression.dispatchReceiver) { expression.replaceDispatchReceiver(newReceiverAccess) diff --git a/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt b/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt index 0a437e643e5..31d6389d31c 100644 --- a/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt +++ b/compiler/frontend.common/src/org/jetbrains/kotlin/KtSourceElement.kt @@ -14,6 +14,8 @@ import com.intellij.psi.PsiFile import com.intellij.psi.PsiWhiteSpace import com.intellij.psi.tree.IElementType import com.intellij.util.diff.FlyweightCapableTreeStructure +import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.util.OperatorNameConventions import org.jetbrains.kotlin.utils.getElementTextWithContext sealed class KtSourceElementKind { @@ -146,16 +148,16 @@ sealed class KtFakeSourceElementKind(final override val shouldSkipErrorTypeRepor // x++ -> x = x.inc() // x = x++ -> x = { val = x; x = .inc(); } - object DesugaredIncrementOrDecrement : KtFakeSourceElementKind() + sealed class DesugaredIncrementOrDecrement : KtFakeSourceElementKind() + object DesugaredPrefixInc : DesugaredIncrementOrDecrement() + object DesugaredPrefixDec : DesugaredIncrementOrDecrement() + object DesugaredPostfixInc : DesugaredIncrementOrDecrement() + object DesugaredPostfixDec : DesugaredIncrementOrDecrement() // In ++a[1], a.get(1) will be called twice. This kind is used for the second call reference. - object DesugaredPrefixSecondGetReference : KtFakeSourceElementKind() - - // ++x --> `inc` calleeReference - object DesugaredPrefixNameReference : KtFakeSourceElementKind() - - // x++ --> `inc` calleeReference - object DesugaredPostfixNameReference : KtFakeSourceElementKind() + sealed class DesugaredPrefixSecondGetReference : KtFakeSourceElementKind() + object DesugaredPrefixIncSecondGetReference : DesugaredPrefixSecondGetReference() + object DesugaredPrefixDecSecondGetReference : DesugaredPrefixSecondGetReference() // x !in list --> !(x in list) where ! and !(x in list) will have a fake source object DesugaredInvertedContains : KtFakeSourceElementKind() @@ -608,5 +610,19 @@ inline fun LighterASTNode.toKtLightSourceElement( tree: FlyweightCapableTreeStructure, kind: KtSourceElementKind = KtRealSourceElementKind, startOffset: Int = this.startOffset, - endOffset: Int = this.endOffset + endOffset: Int = this.endOffset, ): KtLightSourceElement = KtLightSourceElement(this, startOffset, endOffset, tree, kind) + +fun sourceKindForIncOrDec(operation: Name, isPrefix: Boolean) = when (operation) { + OperatorNameConventions.INC -> if (isPrefix) { + KtFakeSourceElementKind.DesugaredPrefixInc + } else { + KtFakeSourceElementKind.DesugaredPostfixInc + } + OperatorNameConventions.DEC -> if (isPrefix) { + KtFakeSourceElementKind.DesugaredPrefixDec + } else { + KtFakeSourceElementKind.DesugaredPostfixDec + } + else -> error("Unexpected operator: ${operation.identifier}") +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.fir.ir.txt b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.fir.ir.txt index 76a41d813e4..ced7e37c008 100644 --- a/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.fir.ir.txt +++ b/compiler/testData/codegen/box/annotations/javaAnnotationArrayValueDefault.fir.ir.txt @@ -113,28 +113,28 @@ FILE fqName: fileName:/1.kt BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value1: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 arg1: CONST String type=kotlin.String value="d1" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="fail2: " - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value1: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value1: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=1 arg1: CONST String type=kotlin.String value="d2" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="fail3: " - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value1: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=1 VAR name:value2 type:kotlin.Array [val] @@ -163,28 +163,28 @@ FILE fqName: fileName:/1.kt BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value2: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 arg1: CONST String type=kotlin.String value="d1" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="fail5: " - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value2: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=IF BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value2: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=1 arg1: CONST String type=kotlin.String value="d2" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="fail6: " - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value2: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=1 VAR name:value3 type:kotlin.Array [val] @@ -213,14 +213,14 @@ FILE fqName: fileName:/1.kt BRANCH if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + arg0: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value3: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 arg1: CONST String type=kotlin.String value="asd" then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="fail8: " - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.String origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val value3: kotlin.Array declared in .box' type=kotlin.Array origin=null index: CONST Int type=kotlin.Int value=0 VAR name:value4 type:kotlin.Array [val] diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt index 2d9add4f19a..e5a840f5c60 100644 --- a/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt +++ b/compiler/testData/diagnostics/tests/operatorsOverloading/InconsistentGetSet.fir.kt @@ -38,8 +38,8 @@ fun testMismatchingArities() { MismatchingArities1[0]++ MismatchingArities1[0] += 1 - ++MismatchingArities2[0] - MismatchingArities2[0]++ + ++MismatchingArities2[0] + MismatchingArities2[0]++ MismatchingArities2[0] += 1 } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt index 4e368c4e28a..bf38f63c136 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt @@ -182,11 +182,11 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .MyContainer' type=.MyContainer origin=null i: CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: BLOCK type=.MyContainer origin=null + $receiver: BLOCK type=.MyContainer origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.MyContainer [val] - GET_VAR 'var myContainer: .MyContainer declared in .box' type=.MyContainer origin=null - SET_VAR 'var myContainer: .MyContainer declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .MyContainer declared in ' type=.MyContainer origin=null + GET_VAR 'var myContainer: .MyContainer declared in .box' type=.MyContainer origin=POSTFIX_INCR + SET_VAR 'var myContainer: .MyContainer declared in .box' type=kotlin.Unit origin=POSTFIX_INCR + CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .MyContainer declared in ' type=.MyContainer origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_1: .MyContainer declared in .box.' type=.MyContainer origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null GET_VAR 'val tmp_1: .MyContainer declared in .box.' type=.MyContainer origin=null diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt index 5017a3d580f..b3861dfa5ac 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt @@ -231,16 +231,16 @@ FILE fqName: fileName:/iteratorOperator.kt $this: VALUE_PARAMETER name: type:.CounterIterator BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun next (): kotlin.Int declared in .CounterIterator' - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Counter [val] CALL 'private final fun (): .Counter declared in .CounterIterator' type=.Counter origin=GET_PROPERTY $this: GET_VAR ': .CounterIterator declared in .CounterIterator.next' type=.CounterIterator origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .Counter' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .Counter' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: .Counter declared in .CounterIterator.next' type=.Counter origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Counter' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Counter' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: .Counter declared in .CounterIterator.next' type=.Counter origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_3: kotlin.Int declared in .CounterIterator.next' type=kotlin.Int origin=null GET_VAR 'val tmp_3: kotlin.Int declared in .CounterIterator.next' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt index 06906f6f31d..fe6423c59a3 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt @@ -186,20 +186,20 @@ FILE fqName: fileName:/unaryOperators.kt $receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=.Result origin=null + BLOCK type=.Result origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Result [val] - GET_VAR 'var result: .Result declared in .box' type=.Result origin=null - SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=null + GET_VAR 'var result: .Result declared in .box' type=.Result origin=POSTFIX_INCR + SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=POSTFIX_INCR + CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_1: .Result declared in .box.' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null GET_VAR 'val tmp_1: .Result declared in .box.' type=.Result origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=.Result origin=null + BLOCK type=.Result origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.Result [val] - GET_VAR 'var result: .Result declared in .box' type=.Result origin=null - SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=null + GET_VAR 'var result: .Result declared in .box' type=.Result origin=POSTFIX_INCR + SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=POSTFIX_INCR + CALL 'public final fun inc ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_2: .Result declared in .box.' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null GET_VAR 'val tmp_2: .Result declared in .box.' type=.Result origin=null @@ -212,11 +212,11 @@ FILE fqName: fileName:/unaryOperators.kt $receiver: GET_VAR 'var result: .Result declared in .box' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='local final fun (): .Result declared in .box' - BLOCK type=.Result origin=null + BLOCK type=.Result origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:.Result [val] - GET_VAR 'var result: .Result declared in .box' type=.Result origin=null - SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun dec ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=null + GET_VAR 'var result: .Result declared in .box' type=.Result origin=POSTFIX_DECR + SET_VAR 'var result: .Result declared in .box' type=kotlin.Unit origin=POSTFIX_DECR + CALL 'public final fun dec ($context_receiver_0: kotlin.Int): .Result declared in ' type=.Result origin=POSTFIX_DECR $receiver: GET_VAR 'val tmp_3: .Result declared in .box.' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null GET_VAR 'val tmp_3: .Result declared in .box.' type=.Result origin=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt index 3d5f8ee1703..31c49bfd258 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt @@ -53,7 +53,7 @@ FILE fqName: fileName:/localDelegatedProperties.kt VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'local final fun (): kotlin.Int declared in .test2' type=kotlin.Int origin=GET_LOCAL_PROPERTY CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=POSTFIX_INCR - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: kotlin.Int declared in .test2' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int declared in .test2' type=kotlin.Int origin=null CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=PLUSEQ diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.ir.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.ir.txt index ca5fd81bd4f..688135d6371 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.ir.txt @@ -83,13 +83,13 @@ FILE fqName: fileName:/arrayAugmentedAssignment1.kt VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.IntArray declared in .testMember' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_5: kotlin.Int declared in .testMember' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.IntArray declared in .testMember' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_5: kotlin.Int declared in .testMember' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_6: kotlin.Int declared in .testMember' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_6: kotlin.Int declared in .testMember' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt index 7c94afa773e..41ca7b617c0 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.ir.txt @@ -101,22 +101,22 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR SET_VAR 'var i: kotlin.Int declared in .test5' type=kotlin.Unit origin=PREFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var i: kotlin.Int declared in .test5' type=kotlin.Int origin=null - GET_VAR 'var i: kotlin.Int declared in .test5' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'var i: kotlin.Int declared in .test5' type=kotlin.Int origin=PREFIX_INCR + GET_VAR 'var i: kotlin.Int declared in .test5' type=kotlin.Int origin=PREFIX_INCR VAR name:j type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 BLOCK type=kotlin.Unit origin=null DO_WHILE label=Inner origin=DO_WHILE_LOOP body: COMPOSITE type=kotlin.Unit origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR SET_VAR 'var j: kotlin.Int declared in .test5' type=kotlin.Unit origin=PREFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var j: kotlin.Int declared in .test5' type=kotlin.Int origin=null - GET_VAR 'var j: kotlin.Int declared in .test5' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'var j: kotlin.Int declared in .test5' type=kotlin.Int origin=PREFIX_INCR + GET_VAR 'var j: kotlin.Int declared in .test5' type=kotlin.Int origin=PREFIX_INCR condition: WHEN type=kotlin.Boolean origin=IF BRANCH if: CALL 'public final fun greaterOrEqual (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GTEQ diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt index d69abd94f2e..f4657921c5d 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt @@ -117,11 +117,11 @@ FILE fqName: fileName:/breakContinueInWhen.kt DO_WHILE label=null origin=DO_WHILE_LOOP body: COMPOSITE type=kotlin.Unit origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR SET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Unit origin=PREFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Int origin=null - GET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Int origin=PREFIX_INCR + GET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Int origin=PREFIX_INCR WHEN type=kotlin.Unit origin=WHEN BRANCH if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt index bb40aca467f..72a6844a390 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt @@ -123,52 +123,52 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - GET_VAR 'var i: kotlin.Int declared in .test1' type=kotlin.Int origin=null + GET_VAR 'var i: kotlin.Int declared in .test1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var i: kotlin.Int declared in .test1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: kotlin.Int declared in .test1' type=kotlin.Int origin=null GET_VAR 'val tmp_2: kotlin.Int declared in .test1' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: kotlin.IntArray declared in .test1' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_1: kotlin.Int declared in .test1' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: kotlin.IntArray declared in .test1' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_1: kotlin.Int declared in .test1' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_3: kotlin.Int declared in .test1' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_3: kotlin.Int declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .X1' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .X1' type=kotlin.Int origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.Int declared in .test2' type=kotlin.Int origin=null GET_VAR 'val tmp_4: kotlin.Int declared in .test2' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .X1.X2' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .X1.X2' type=kotlin.Int origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1.X2' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1.X2' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_5: kotlin.Int declared in .test2' type=kotlin.Int origin=null GET_VAR 'val tmp_5: kotlin.Int declared in .test2' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .X1.X2.X3' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .X1.X2.X3' type=kotlin.Int origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1.X2.X3' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .X1.X2.X3' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_6: kotlin.Int declared in .test2' type=kotlin.Int origin=null GET_VAR 'val tmp_6: kotlin.Int declared in .test2' type=kotlin.Int origin=null CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any] diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.ir.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.ir.txt index f278d16d4fc..c25f4d49659 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.ir.txt @@ -80,13 +80,13 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt $receiver: VALUE_PARAMETER name: type:.IntCell BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun next (): kotlin.Int declared in .IReceiver' - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR ': .IntCell declared in .IReceiver.next' type=.IntCell origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .IntCell' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .IntCell' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR ': .IntCell declared in .IReceiver.next' type=.IntCell origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_0: kotlin.Int declared in .IReceiver.next' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int declared in .IReceiver.next' type=kotlin.Int origin=null FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/expressions/ifWithArrayOperation.fir.ir.txt b/compiler/testData/ir/irText/expressions/ifWithArrayOperation.fir.ir.txt index def960f32bb..8fb43ba5de4 100644 --- a/compiler/testData/ir/irText/expressions/ifWithArrayOperation.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/ifWithArrayOperation.fir.ir.txt @@ -103,7 +103,7 @@ FILE fqName: fileName:/ifWithArrayOperation.kt other: CONST Int type=kotlin.Int value=9 BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val array: kotlin.IntArray declared in .topLevelMethod' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=WHEN @@ -125,7 +125,7 @@ FILE fqName: fileName:/ifWithArrayOperation.kt value: CONST Int type=kotlin.Int value=11 BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val array: kotlin.IntArray declared in .topLevelMethod' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=WHEN @@ -147,7 +147,7 @@ FILE fqName: fileName:/ifWithArrayOperation.kt value: CONST Int type=kotlin.Int value=13 BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val array: kotlin.IntArray declared in .topLevelMethod' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=WHEN @@ -187,7 +187,7 @@ FILE fqName: fileName:/ifWithArrayOperation.kt other: CONST Int type=kotlin.Int value=15 BLOCK type=kotlin.Unit origin=WHEN VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=GET_ARRAY_ELEMENT $this: GET_VAR 'val array: kotlin.IntArray declared in .topLevelMethod' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 WHEN type=kotlin.Unit origin=WHEN diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.ir.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.ir.txt index 7ff531885e6..a135ad1cf19 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.ir.txt @@ -130,17 +130,17 @@ FILE fqName: fileName:/incrementDecrement.kt VAR name:x type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 VAR name:x1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR SET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Unit origin=PREFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=null - GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=PREFIX_INCR + GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=PREFIX_INCR VAR name:x2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR SET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Unit origin=PREFIX_DECR - CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=null - GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=null + CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=PREFIX_DECR + GET_VAR 'var x: kotlin.Int declared in .testVarPrefix' type=kotlin.Int origin=PREFIX_DECR FUN name:testVarPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:x type:kotlin.Int [var] @@ -148,344 +148,344 @@ FILE fqName: fileName:/incrementDecrement.kt VAR name:x1 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null VAR name:x2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=POSTFIX_DECR SET_VAR 'var x: kotlin.Int declared in .testVarPostfix' type=kotlin.Unit origin=POSTFIX_DECR - CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_1: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .testVarPostfix' type=kotlin.Int origin=null FUN name:testPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + BLOCK type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=PREFIX_INCR + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=PREFIX_INCR VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY + BLOCK type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=PREFIX_DECR + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=PREFIX_DECR FUN name:testPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=POSTFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=POSTFIX_INCR + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: kotlin.Int declared in .testPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_2: kotlin.Int declared in .testPropPostfix' type=kotlin.Int origin=null VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=POSTFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=POSTFIX_DECR + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_3: kotlin.Int declared in .testPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_3: kotlin.Int declared in .testPropPostfix' type=kotlin.Int origin=null FUN name:testArrayPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.IntArray [val] CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_5: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_5: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_5: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.IntArray [val] CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_6: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_7: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_6: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_7: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_6: kotlin.IntArray declared in .testArrayPrefix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_7: kotlin.Int declared in .testArrayPrefix' type=kotlin.Int origin=null FUN name:testArrayPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.IntArray [val] CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_8: kotlin.IntArray declared in .testArrayPostfix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_9: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_8: kotlin.IntArray declared in .testArrayPostfix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_9: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_10: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_10: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.IntArray [val] CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_11: kotlin.IntArray declared in .testArrayPostfix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_12: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in kotlin.IntArray' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_11: kotlin.IntArray declared in .testArrayPostfix' type=kotlin.IntArray origin=null index: GET_VAR 'val tmp_12: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_13: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_13: kotlin.Int declared in .testArrayPostfix' type=kotlin.Int origin=null FUN name:testClassPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_14 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_14: .C declared in .testClassPropPrefix' type=.C origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_14: .C declared in .testClassPropPrefix' type=.C origin=null - CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_14: .C declared in .testClassPropPrefix' type=.C origin=null VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_15 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_15: .C declared in .testClassPropPrefix' type=.C origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_15: .C declared in .testClassPropPrefix' type=.C origin=null - CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_15: .C declared in .testClassPropPrefix' type=.C origin=null FUN name:testClassPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_16 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_17 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_16: .C declared in .testClassPropPostfix' type=.C origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_16: .C declared in .testClassPropPostfix' type=.C origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_17: kotlin.Int declared in .testClassPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_17: kotlin.Int declared in .testClassPropPostfix' type=kotlin.Int origin=null VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_18 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_19 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .C' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_18: .C declared in .testClassPropPostfix' type=.C origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_18: .C declared in .testClassPropPostfix' type=.C origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_19: kotlin.Int declared in .testClassPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_19: kotlin.Int declared in .testClassPropPostfix' type=kotlin.Int origin=null FUN name:testClassOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_20 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_21 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_20: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_21: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_20: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_21: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_20: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_21: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_22 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_23 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_22: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_23: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_22: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_23: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_22: .C declared in .testClassOperatorPrefix' type=.C origin=null i: GET_VAR 'val tmp_23: kotlin.Int declared in .testClassOperatorPrefix' type=kotlin.Int origin=null FUN name:testClassOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_26 type:kotlin.Int [val] - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_24: .C declared in .testClassOperatorPostfix' type=.C origin=null i: GET_VAR 'val tmp_25: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_24: .C declared in .testClassOperatorPostfix' type=.C origin=null i: GET_VAR 'val tmp_25: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_26: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_26: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:.C [val] CONSTRUCTOR_CALL 'public constructor () declared in .C' type=.C origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_29 type:kotlin.Int [val] - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .C' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_27: .C declared in .testClassOperatorPostfix' type=.C origin=null i: GET_VAR 'val tmp_28: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .C' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_27: .C declared in .testClassOperatorPostfix' type=.C origin=null i: GET_VAR 'val tmp_28: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_29: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_29: kotlin.Int declared in .testClassOperatorPostfix' type=kotlin.Int origin=null FUN name:testObjectPropPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O FUN name:testObjectPropPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:p1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_30: kotlin.Int declared in .testObjectPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_30: kotlin.Int declared in .testObjectPropPostfix' type=kotlin.Int origin=null VAR name:p2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in .O' type=kotlin.Int origin=POSTFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_31: kotlin.Int declared in .testObjectPropPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_31: kotlin.Int declared in .testObjectPropPostfix' type=kotlin.Int origin=null FUN name:testObjectOperatorPrefix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:.O [val] GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_32: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_33: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_32: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_33: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_32: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_33: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:.O [val] GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_34: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_35: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_34: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_35: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_34: .O declared in .testObjectOperatorPrefix' type=.O origin=null i: GET_VAR 'val tmp_35: kotlin.Int declared in .testObjectOperatorPrefix' type=kotlin.Int origin=null FUN name:testObjectOperatorPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:a1 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_36 type:.O [val] GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlin.Int [val] - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_36: .O declared in .testObjectOperatorPostfix' type=.O origin=null i: GET_VAR 'val tmp_37: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_36: .O declared in .testObjectOperatorPostfix' type=.O origin=null i: GET_VAR 'val tmp_37: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_38: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_38: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_39 type:.O [val] GET_OBJECT 'CLASS OBJECT name:O modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.O VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Int [val] - CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int): kotlin.Int declared in .O' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_39: .O declared in .testObjectOperatorPostfix' type=.O origin=null i: GET_VAR 'val tmp_40: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in .O' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_39: .O declared in .testObjectOperatorPostfix' type=.O origin=null i: GET_VAR 'val tmp_40: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_41: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null GET_VAR 'val tmp_41: kotlin.Int declared in .testObjectOperatorPostfix' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt index 7cdbc364c0b..ea345a7d2ae 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt @@ -10,15 +10,15 @@ FILE fqName: fileName:/javaSyntheticGenericPropertyAccess.kt $this: GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null x: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.J.test> [val] GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_0: .J.test> declared in .test' type=.J.test> origin=null - CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: .J.test> declared in .test' type=.J.test> origin=null - x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null BLOCK type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt index a657aca8b12..4f13fca82e8 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt @@ -9,15 +9,15 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt $this: GET_VAR 'j: .J declared in .test' type=.J origin=null x: CONST Int type=kotlin.Int value=1 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.J [val] GET_VAR 'j: .J declared in .test' type=.J origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_0: .J declared in .test' type=.J origin=null - CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ + CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: .J declared in .test' type=.J origin=null - x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + x: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null BLOCK type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/expressions/kt28456.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt28456.fir.ir.txt index 0dcb3169f92..49f5f472fa6 100644 --- a/compiler/testData/ir/irText/expressions/kt28456.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt28456.fir.ir.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/kt28456.kt VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: .A): kotlin.Int declared in ' - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] GET_VAR 'a: .A declared in .testPostfixIncrement' type=.A origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] @@ -50,16 +50,16 @@ FILE fqName: fileName:/kt28456.kt VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] CONST Int type=kotlin.Int value=2 VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun get (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + CALL 'public final fun get (vararg xs: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_0: .A declared in .testPostfixIncrement' type=.A origin=null xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int GET_VAR 'val tmp_1: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null GET_VAR 'val tmp_2: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_0: .A declared in .testPostfixIncrement' type=.A origin=null i: GET_VAR 'val tmp_1: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null j: GET_VAR 'val tmp_2: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null - v: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + v: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_3: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null GET_VAR 'val tmp_3: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/kt28456b.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt28456b.fir.ir.txt index b401c976418..89fcf435352 100644 --- a/compiler/testData/ir/irText/expressions/kt28456b.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt28456b.fir.ir.txt @@ -55,19 +55,19 @@ FILE fqName: fileName:/kt28456b.kt VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: .A): kotlin.Int declared in ' - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] GET_VAR 'a: .A declared in .testPostfixIncrement' type=.A origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] CONST Int type=kotlin.Int value=1 VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - CALL 'public final fun get (i: kotlin.Int, a: kotlin.Int, b: kotlin.Int, c: kotlin.Int, d: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null + CALL 'public final fun get (i: kotlin.Int, a: kotlin.Int, b: kotlin.Int, c: kotlin.Int, d: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_0: .A declared in .testPostfixIncrement' type=.A origin=null i: GET_VAR 'val tmp_1: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun set (i: kotlin.Int, j: kotlin.Int, v: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_0: .A declared in .testPostfixIncrement' type=.A origin=null i: GET_VAR 'val tmp_1: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null - v: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + v: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null GET_VAR 'val tmp_2: kotlin.Int declared in .testPostfixIncrement' type=kotlin.Int origin=null FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/kt36956.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt36956.fir.ir.txt deleted file mode 100644 index c5e06920e1a..00000000000 --- a/compiler/testData/ir/irText/expressions/kt36956.fir.ir.txt +++ /dev/null @@ -1,79 +0,0 @@ -FILE fqName: fileName:/kt36956.kt - CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A.A> - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> (value:T of .A) returnType:.A.A> [primary] - VALUE_PARAMETER name:value index:0 type:T of .A - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' - PROPERTY name:value visibility:private modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:value type:T of .A visibility:private [final] - EXPRESSION_BODY - GET_VAR 'value: T of .A declared in .A.' type=T of .A origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:.A.A>) returnType:T of .A - correspondingProperty: PROPERTY name:value visibility:private modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.A.A> - BLOCK_BODY - RETURN type=kotlin.Nothing from='private final fun (): T of .A declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:T of .A visibility:private [final]' type=T of .A origin=null - receiver: GET_VAR ': .A.A> declared in .A.' type=.A.A> origin=null - FUN name:get visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int) returnType:T of .A [operator] - $this: VALUE_PARAMETER name: type:.A.A> - VALUE_PARAMETER name:i index:0 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun get (i: kotlin.Int): T of .A declared in .A' - CALL 'private final fun (): T of .A declared in .A' type=T of .A origin=GET_PROPERTY - $this: GET_VAR ': .A.A> declared in .A.get' type=.A.A> origin=null - FUN name:set visibility:public modality:FINAL <> ($this:.A.A>, i:kotlin.Int, v:T of .A) returnType:kotlin.Unit [operator] - $this: VALUE_PARAMETER name: type:.A.A> - VALUE_PARAMETER name:i index:0 type:kotlin.Int - VALUE_PARAMETER name:v index:1 type:T of .A - BLOCK_BODY - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - PROPERTY name:aFloat visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static] - EXPRESSION_BODY - CONSTRUCTOR_CALL 'public constructor (value: T of .A) declared in .A' type=.A origin=null - : kotlin.Float - value: CONST Float type=kotlin.Float value=0.0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:.A - correspondingProperty: PROPERTY name:aFloat visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): .A declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aFloat type:.A visibility:private [final,static]' type=.A origin=null - PROPERTY name:aInt visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static] - EXPRESSION_BODY - BLOCK type=kotlin.Float origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] - CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - CONST Int type=kotlin.Int value=1 - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Float [val] - CALL 'public final fun get (i: kotlin.Int): T of .A declared in .A' type=kotlin.Float origin=null - $this: GET_VAR 'val tmp_0: .A declared in .aInt' type=.A origin=null - i: GET_VAR 'val tmp_1: kotlin.Int declared in .aInt' type=kotlin.Int origin=null - CALL 'public final fun set (i: kotlin.Int, v: T of .A): kotlin.Unit declared in .A' type=kotlin.Unit origin=null - $this: GET_VAR 'val tmp_0: .A declared in .aInt' type=.A origin=null - i: GET_VAR 'val tmp_1: kotlin.Int declared in .aInt' type=kotlin.Int origin=null - v: CALL 'public final fun dec (): kotlin.Float declared in kotlin.Float' type=kotlin.Float origin=null - $this: GET_VAR 'val tmp_2: kotlin.Float declared in .aInt' type=kotlin.Float origin=null - GET_VAR 'val tmp_2: kotlin.Float declared in .aInt' type=kotlin.Float origin=null - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Float - correspondingProperty: PROPERTY name:aInt visibility:public modality:FINAL [val] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Float declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:aInt type:kotlin.Float visibility:private [final,static]' type=kotlin.Float origin=null diff --git a/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt b/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt deleted file mode 100644 index 3e92394811d..00000000000 --- a/compiler/testData/ir/irText/expressions/kt36956.fir.kt.txt +++ /dev/null @@ -1,33 +0,0 @@ -class A { - constructor(value: T) /* primary */ { - super/*Any*/() - /* () */ - - } - - private val value: T - field = value - private get - - operator fun get(i: Int): T { - return .() - } - - operator fun set(i: Int, v: T) { - } - -} - -val aFloat: A - field = A(value = 0.0F) - get - -val aInt: Float - field = { // BLOCK - 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 b/compiler/testData/ir/irText/expressions/kt36956.kt index 221638961f6..d97e38ba751 100644 --- a/compiler/testData/ir/irText/expressions/kt36956.kt +++ b/compiler/testData/ir/irText/expressions/kt36956.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class A(private val value: T) { operator fun get(i: Int) = value operator fun set(i: Int, v: T) {} diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt index d9197985274..6722c414c04 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt @@ -56,13 +56,13 @@ FILE fqName: fileName:/lambdaInCAO.kt RETURN type=kotlin.Nothing from='local final fun (): kotlin.Unit declared in .test3' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Function0): kotlin.Int declared in ' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Function0): kotlin.Int declared in ' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_2: kotlin.Any declared in .test3' type=kotlin.Any origin=null index: GET_VAR 'val tmp_3: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - CALL 'public final fun set (index: kotlin.Function0, value: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Function0, value: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_2: kotlin.Any declared in .test3' type=kotlin.Any origin=null index: GET_VAR 'val tmp_3: kotlin.Function0 declared in .test3' type=kotlin.Function0 origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.Int declared in .test3' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_4: kotlin.Int declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt index e938ad240a2..6a0d365fb33 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.ir.txt @@ -73,15 +73,15 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Int origin=null + then: BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:test.C [val] GET_VAR 'val tmp_1: test.C? declared in test.testProperty' type=test.C? origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_2: test.C declared in test.testProperty' type=test.C origin=null - CALL 'public final fun (value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=EQ + CALL 'public final fun (value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_2: test.C declared in test.testProperty' type=test.C origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_3: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null GET_VAR 'val tmp_3: kotlin.Int declared in test.testProperty' type=kotlin.Int origin=null FUN name:testArrayAccess visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit @@ -99,19 +99,19 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Int origin=null + then: BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int origin=GET_PROPERTY $receiver: GET_VAR 'val tmp_4: test.C? declared in test.testArrayAccess' type=test.C? origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in test' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in test' type=kotlin.Int origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null index: GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: kotlin.Int): kotlin.Unit declared in test' type=kotlin.Unit origin=POSTFIX_INCR $receiver: GET_VAR 'val tmp_5: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null index: GET_VAR 'val tmp_6: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_7: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null GET_VAR 'val tmp_7: kotlin.Int declared in test.testArrayAccess' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.ir.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.ir.txt deleted file mode 100644 index f8a166dadbf..00000000000 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.ir.txt +++ /dev/null @@ -1,90 +0,0 @@ -FILE fqName: fileName:/whileDoWhile.kt - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:x type:kotlin.Int [var] - CONST Int type=kotlin.Int value=0 - WHILE label=null origin=WHILE_LOOP - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=0 - WHILE label=null origin=WHILE_LOOP - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=5 - body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - SET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: kotlin.Int declared in .test' type=kotlin.Int origin=null - GET_VAR 'val tmp_0: kotlin.Int declared in .test' type=kotlin.Int origin=null - WHILE label=null origin=WHILE_LOOP - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=10 - body: BLOCK type=kotlin.Unit origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - SET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null - GET_VAR 'val tmp_1: kotlin.Int declared in .test' type=kotlin.Int origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=0 - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=7 - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - SET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_2: kotlin.Int declared in .test' type=kotlin.Int origin=null - GET_VAR 'val tmp_2: kotlin.Int declared in .test' type=kotlin.Int origin=null - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=15 - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - SET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_3: kotlin.Int declared in .test' type=kotlin.Int origin=null - GET_VAR 'val tmp_3: kotlin.Int declared in .test' type=kotlin.Int origin=null - condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT - arg0: GET_VAR 'var x: kotlin.Int declared in .test' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=20 - FUN name:testSmartcastInCondition visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:a type:kotlin.Any? [val] - CONST Null type=kotlin.Nothing? value=null - WHEN type=kotlin.Unit origin=IF - BRANCH - if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Boolean - GET_VAR 'val a: kotlin.Any? declared in .testSmartcastInCondition' type=kotlin.Any? origin=null - then: BLOCK type=kotlin.Unit origin=null - WHILE label=null origin=WHILE_LOOP - condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean - GET_VAR 'val a: kotlin.Any? declared in .testSmartcastInCondition' type=kotlin.Any? origin=null - body: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean - GET_VAR 'val a: kotlin.Any? declared in .testSmartcastInCondition' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt deleted file mode 100644 index 754b310c572..00000000000 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.kt.txt +++ /dev/null @@ -1,54 +0,0 @@ -fun test() { - var x: Int = 0 - while (less(arg0 = x, arg1 = 0)) - while (less(arg0 = x, arg1 = 5)) { // BLOCK - val tmp_0: Int = x - x = tmp_0.inc() - tmp_0 - } /*~> Unit */ - while (less(arg0 = x, arg1 = 10)) { // BLOCK - { // BLOCK - val tmp_1: Int = x - x = tmp_1.inc() - tmp_1 - } /*~> Unit */ - } - { // BLOCK - do while (less(arg0 = x, arg1 = 0)) - } - { // BLOCK - do// COMPOSITE { - // } while (less(arg0 = x, arg1 = 7)) - } - { // BLOCK - do{ // BLOCK - val tmp_2: Int = x - x = tmp_2.inc() - tmp_2 - } /*~> Unit */ while (less(arg0 = x, arg1 = 15)) - } - { // BLOCK - do// COMPOSITE { - { // BLOCK - val tmp_3: Int = x - x = tmp_3.inc() - tmp_3 - } /*~> Unit */ - // } while (less(arg0 = x, arg1 = 20)) - } -} - -fun testSmartcastInCondition() { - val a: Any? = null - when { - a is Boolean -> { // BLOCK - while (a /*as Boolean */) { // BLOCK - } - { // BLOCK - do// COMPOSITE { - // } while (a /*as Boolean */) - } - } - } -} - diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.kt b/compiler/testData/ir/irText/expressions/whileDoWhile.kt index 6174f0de8b7..93b032edbeb 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.kt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun test() { var x = 0 while (x < 0); diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt index 575ddf0b7fe..0d11cb8099f 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt @@ -464,16 +464,15 @@ FILE fqName: fileName:/ArrayMap.kt index: GET_VAR 'index: kotlin.Int declared in .ArrayMapImpl.set' type=kotlin.Int origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null - BLOCK type=kotlin.Int origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - CALL 'public open fun (): kotlin.Int declared in .ArrayMapImpl' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.set' type=.ArrayMapImpl.ArrayMapImpl> origin=null - CALL 'private open fun (: kotlin.Int): kotlin.Unit declared in .ArrayMapImpl' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=POSTFIX_INCR + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] + CALL 'public open fun (): kotlin.Int declared in .ArrayMapImpl' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.set' type=.ArrayMapImpl.ArrayMapImpl> origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: kotlin.Int declared in .ArrayMapImpl.set' type=kotlin.Int origin=null - GET_VAR 'val tmp_0: kotlin.Int declared in .ArrayMapImpl.set' type=kotlin.Int origin=null + CALL 'private open fun (: kotlin.Int): kotlin.Unit declared in .ArrayMapImpl' type=kotlin.Unit origin=POSTFIX_INCR + $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.set' type=.ArrayMapImpl.ArrayMapImpl> origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR + $this: GET_VAR 'val tmp_0: kotlin.Int declared in .ArrayMapImpl.set' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int declared in .ArrayMapImpl.set' type=kotlin.Int origin=null CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null $this: CALL 'private final fun (): kotlin.Array declared in .ArrayMapImpl' type=kotlin.Array origin=GET_PROPERTY $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.set' type=.ArrayMapImpl.ArrayMapImpl> origin=null @@ -548,11 +547,11 @@ FILE fqName: fileName:/ArrayMap.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - CALL 'private final fun (): kotlin.Int declared in .ArrayMapImpl.iterator.' type=kotlin.Int origin=GET_PROPERTY + CALL 'private final fun (): kotlin.Int declared in .ArrayMapImpl.iterator.' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR ': .ArrayMapImpl.iterator..ArrayMapImpl> declared in .ArrayMapImpl.iterator..computeNext' type=.ArrayMapImpl.iterator..ArrayMapImpl> origin=null CALL 'private final fun (: kotlin.Int): kotlin.Unit declared in .ArrayMapImpl.iterator.' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR ': .ArrayMapImpl.iterator..ArrayMapImpl> declared in .ArrayMapImpl.iterator..computeNext' type=.ArrayMapImpl.iterator..ArrayMapImpl> origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_1: kotlin.Int declared in .ArrayMapImpl.iterator..computeNext' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .ArrayMapImpl.iterator..computeNext' type=kotlin.Int origin=null condition: WHEN type=kotlin.Boolean origin=ANDAND @@ -640,16 +639,15 @@ FILE fqName: fileName:/ArrayMap.kt index: GET_VAR 'index: kotlin.Int declared in .ArrayMapImpl.remove' type=kotlin.Int origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null - BLOCK type=kotlin.Int origin=null - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - CALL 'public open fun (): kotlin.Int declared in .ArrayMapImpl' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.remove' type=.ArrayMapImpl.ArrayMapImpl> origin=null - CALL 'private open fun (: kotlin.Int): kotlin.Unit declared in .ArrayMapImpl' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=POSTFIX_DECR + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] + CALL 'public open fun (): kotlin.Int declared in .ArrayMapImpl' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.remove' type=.ArrayMapImpl.ArrayMapImpl> origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_2: kotlin.Int declared in .ArrayMapImpl.remove' type=kotlin.Int origin=null - GET_VAR 'val tmp_2: kotlin.Int declared in .ArrayMapImpl.remove' type=kotlin.Int origin=null + CALL 'private open fun (: kotlin.Int): kotlin.Unit declared in .ArrayMapImpl' type=kotlin.Unit origin=POSTFIX_DECR + $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.remove' type=.ArrayMapImpl.ArrayMapImpl> origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR + $this: GET_VAR 'val tmp_2: kotlin.Int declared in .ArrayMapImpl.remove' type=kotlin.Int origin=null + GET_VAR 'val tmp_2: kotlin.Int declared in .ArrayMapImpl.remove' type=kotlin.Int origin=null CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null $this: CALL 'private final fun (): kotlin.Array declared in .ArrayMapImpl' type=kotlin.Array origin=GET_PROPERTY $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.remove' type=.ArrayMapImpl.ArrayMapImpl> origin=null diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt index a706e8c60a8..d339b549037 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt @@ -196,11 +196,9 @@ internal class ArrayMapImpl : ArrayMap { .ensureCapacity(index = index) when { EQEQ(arg0 = .().get(index = index), arg1 = null) -> { // BLOCK - { // BLOCK - val tmp_0: Int = .() - .( = tmp_0.inc()) - tmp_0 - } + val tmp_0: Int = .() + .( = tmp_0.inc()) + tmp_0 } /*~> Unit */ } .().set(index = index, value = value) @@ -260,11 +258,9 @@ internal class ArrayMapImpl : ArrayMap { fun remove(index: Int) { when { EQEQ(arg0 = .().get(index = index), arg1 = null).not() -> { // BLOCK - { // BLOCK - val tmp_2: Int = .() - .( = tmp_2.dec()) - tmp_2 - } + val tmp_2: Int = .() + .( = tmp_2.dec()) + tmp_2 } /*~> Unit */ } .().set(index = index, value = null) diff --git a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt index afff7eed5e4..fb63fd6b9d6 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt @@ -158,96 +158,96 @@ FILE fqName:foo fileName:/AssignmentOperator.kt $this: GET_VAR 'val tmp_4: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=3 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:foo.A [val] CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null : foo.A t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_5: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_5: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_6: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null GET_VAR 'val tmp_6: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:foo.A [val] CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null : foo.A t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_7: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_7: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_8: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null GET_VAR 'val tmp_8: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:foo.A [val] CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null : foo.A t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_9: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_9: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_9: foo.A declared in foo.runMe' type=foo.A origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:foo.A [val] CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=foo.A origin=null : foo.A t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_10: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_10: foo.A declared in foo.runMe' type=foo.A origin=null - CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_10: foo.A declared in foo.runMe' type=foo.A origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_11: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null GET_VAR 'val tmp_11: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null + BLOCK type=kotlin.Int origin=POSTFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] - CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=POSTFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_12: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null GET_VAR 'val tmp_12: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=PREFIX_INCR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_INCR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=null - CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=EQ + BLOCK type=kotlin.Int origin=PREFIX_DECR + CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.B' type=kotlin.Unit origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + : CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B - CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=GET_PROPERTY + CALL 'public final fun (): kotlin.Int declared in foo.B' type=kotlin.Int origin=PREFIX_DECR $this: GET_OBJECT 'CLASS OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]' type=foo.B CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null $this: CALL 'public final fun id (t: T of foo.id): T of foo.id declared in foo' type=kotlin.Array origin=null @@ -337,13 +337,13 @@ FILE fqName:foo fileName:/AssignmentOperator.kt VAR IR_TEMPORARY_VARIABLE name:tmp_24 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_25 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_23: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_24: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_25: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_25: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null @@ -354,13 +354,13 @@ FILE fqName:foo fileName:/AssignmentOperator.kt VAR IR_TEMPORARY_VARIABLE name:tmp_27 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_28 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_26: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_27: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_26: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_27: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_28: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_28: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null @@ -370,15 +370,15 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_30 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_29: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_30: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_31 type:kotlin.Array [val] @@ -387,15 +387,15 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_32 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_31: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_32: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_33 type:kotlin.Array [val] @@ -403,13 +403,13 @@ FILE fqName:foo fileName:/AssignmentOperator.kt VAR IR_TEMPORARY_VARIABLE name:tmp_34 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_35 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_INCR $this: GET_VAR 'val tmp_33: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_34: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_35: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_35: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null @@ -418,13 +418,13 @@ FILE fqName:foo fileName:/AssignmentOperator.kt VAR IR_TEMPORARY_VARIABLE name:tmp_37 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 VAR IR_TEMPORARY_VARIABLE name:tmp_38 type:kotlin.Int [val] - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_36: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_37: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=POSTFIX_DECR $this: GET_VAR 'val tmp_36: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_37: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR $this: GET_VAR 'val tmp_38: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_VAR 'val tmp_38: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null @@ -432,29 +432,29 @@ FILE fqName:foo fileName:/AssignmentOperator.kt CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_40 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_INCR $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_INCR $this: GET_VAR 'val tmp_39: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_40: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null VAR IR_TEMPORARY_VARIABLE name:tmp_41 type:kotlin.Array [val] CALL 'public final fun (): kotlin.Array declared in foo' type=kotlin.Array origin=GET_PROPERTY VAR IR_TEMPORARY_VARIABLE name:tmp_42 type:kotlin.Int [val] CONST Int type=kotlin.Int value=0 - CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=null + CALL 'public final fun set (index: kotlin.Int, value: T of kotlin.Array): kotlin.Unit declared in kotlin.Array' type=kotlin.Unit origin=PREFIX_DECR $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null - value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_DECR + $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=null + CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Int origin=PREFIX_DECR $this: GET_VAR 'val tmp_41: kotlin.Array declared in foo.runMe' type=kotlin.Array origin=null index: GET_VAR 'val tmp_42: kotlin.Int declared in foo.runMe' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.ir.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.ir.txt deleted file mode 100644 index 99af3cdcf37..00000000000 --- a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.ir.txt +++ /dev/null @@ -1,32 +0,0 @@ -FILE fqName: fileName:/v8arrayToList.kt - CLASS CLASS name:V8Array modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.V8Array - CONSTRUCTOR visibility:public <> () returnType:.V8Array [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:V8Array modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - VAR name:array type:.V8Array [val] - CONSTRUCTOR_CALL 'public constructor () declared in .V8Array' type=.V8Array origin=null - VAR name:list type:kotlin.collections.List [val] - TYPE_OP type=kotlin.collections.List origin=CAST typeOperand=kotlin.collections.List - CALL 'public open fun toList (array: @[FlexibleNullability] .V8Array?): @[FlexibleNullability] kotlin.collections.MutableList? declared in .Utils' type=@[FlexibleNullability] kotlin.collections.MutableList? origin=null - array: GET_VAR 'val array: .V8Array declared in .box' type=.V8Array origin=null - RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CALL 'public abstract fun get (index: kotlin.Int): E of kotlin.collections.List declared in kotlin.collections.List' type=kotlin.String origin=null - $this: GET_VAR 'val list: kotlin.collections.List declared in .box' type=kotlin.collections.List origin=null - index: CONST Int type=kotlin.Int value=0 diff --git a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.kt.txt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.kt.txt deleted file mode 100644 index 4ce9775b538..00000000000 --- a/compiler/testData/ir/irText/firProblems/V8ArrayToList.fir.kt.txt +++ /dev/null @@ -1,14 +0,0 @@ -class V8Array { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - -} - -fun box(): String { - val array: V8Array = V8Array() - val list: List = toList(array = array) as List - return list.get(index = 0) -} diff --git a/compiler/testData/ir/irText/firProblems/V8ArrayToList.kt b/compiler/testData/ir/irText/firProblems/V8ArrayToList.kt index 216ff993061..47ed5a28125 100644 --- a/compiler/testData/ir/irText/firProblems/V8ArrayToList.kt +++ b/compiler/testData/ir/irText/firProblems/V8ArrayToList.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // TARGET_BACKEND: JVM // FILE: Utils.java diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt b/compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt index e393a66ebd8..35a89d52416 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicArrayIncrementDecrement.kt @@ -1,4 +1,6 @@ // TARGET_BACKEND: JS_IR +// KT-65195 +// IGNORE_BACKEND_K2: JS_IR fun testArrayIncrementDecrement(d: dynamic) { val t1 = ++d["prefixIncr"] diff --git a/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.fir.ir.txt b/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.fir.ir.txt index 98bc92b4314..e626de39a2a 100644 --- a/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.fir.ir.txt +++ b/compiler/testData/ir/irText/js/dynamic/dynamicMemberIncrementDecrement.fir.ir.txt @@ -31,7 +31,7 @@ FILE fqName: fileName:/dynamicMemberIncrementDecrement.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=dynamic origin=null + then: BLOCK type=dynamic origin=PREFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:dynamic [val] GET_VAR 'val tmp_0: dynamic declared in .testSafeMemberIncrementDecrement' type=dynamic origin=null DYN_OP operator=EQ type=kotlin.Unit @@ -54,7 +54,7 @@ FILE fqName: fileName:/dynamicMemberIncrementDecrement.kt then: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=dynamic origin=null + then: BLOCK type=dynamic origin=PREFIX_DECR VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:dynamic [val] GET_VAR 'val tmp_2: dynamic declared in .testSafeMemberIncrementDecrement' type=dynamic origin=null DYN_OP operator=EQ type=kotlin.Unit diff --git a/compiler/testData/ir/irText/lambdas/localFunction.fir.ir.txt b/compiler/testData/ir/irText/lambdas/localFunction.fir.ir.txt deleted file mode 100644 index e793eb4d56a..00000000000 --- a/compiler/testData/ir/irText/lambdas/localFunction.fir.ir.txt +++ /dev/null @@ -1,16 +0,0 @@ -FILE fqName: fileName:/localFunction.kt - FUN name:outer visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:x type:kotlin.Int [var] - CONST Int type=kotlin.Int value=0 - FUN LOCAL_FUNCTION name:local visibility:local modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .outer' type=kotlin.Int origin=null - SET_VAR 'var x: kotlin.Int declared in .outer' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: kotlin.Int declared in .outer.local' type=kotlin.Int origin=null - GET_VAR 'val tmp_0: kotlin.Int declared in .outer.local' type=kotlin.Int origin=null - CALL 'local final fun local (): kotlin.Unit declared in .outer' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt b/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt deleted file mode 100644 index 6e681e08756..00000000000 --- a/compiler/testData/ir/irText/lambdas/localFunction.fir.kt.txt +++ /dev/null @@ -1,13 +0,0 @@ -fun outer() { - var x: Int = 0 - local fun local() { - { // BLOCK - val tmp_0: Int = x - x = tmp_0.inc() - tmp_0 - } /*~> Unit */ - } - - local() -} - diff --git a/compiler/testData/ir/irText/lambdas/localFunction.kt b/compiler/testData/ir/irText/lambdas/localFunction.kt index 5241061d047..9ae8df87e33 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.kt +++ b/compiler/testData/ir/irText/lambdas/localFunction.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun outer() { var x = 0 fun local() { x++ } diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.ir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.ir.txt deleted file mode 100644 index abc83805d5e..00000000000 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.ir.txt +++ /dev/null @@ -1,38 +0,0 @@ -FILE fqName: fileName:/coercionInLoop.kt - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - VAR name:a type:kotlin.DoubleArray [val] - CONSTRUCTOR_CALL 'public constructor (size: kotlin.Int) declared in kotlin.DoubleArray' type=kotlin.DoubleArray origin=null - size: CONST Int type=kotlin.Int value=5 - VAR name:x type:kotlin.collections.DoubleIterator [val] - CALL 'public final fun iterator (): kotlin.collections.DoubleIterator declared in kotlin.DoubleArray' type=kotlin.collections.DoubleIterator origin=null - $this: GET_VAR 'val a: kotlin.DoubleArray declared in .box' type=kotlin.DoubleArray origin=null - VAR name:i type:kotlin.Int [var] - CONST Int type=kotlin.Int value=0 - WHILE label=null origin=WHILE_LOOP - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.DoubleIterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val x: kotlin.collections.DoubleIterator declared in .box' type=kotlin.collections.DoubleIterator origin=null - body: BLOCK type=kotlin.Unit origin=null - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ - $this: CALL 'public final fun ieee754equals (arg0: kotlin.Double?, arg1: kotlin.Double?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public final fun get (index: kotlin.Int): kotlin.Double declared in kotlin.DoubleArray' type=kotlin.Double origin=null - $this: GET_VAR 'val a: kotlin.DoubleArray declared in .box' type=kotlin.DoubleArray origin=null - index: GET_VAR 'var i: kotlin.Int declared in .box' type=kotlin.Int origin=null - arg1: CALL 'public final fun next (): kotlin.Double declared in kotlin.collections.DoubleIterator' type=kotlin.Double origin=null - $this: GET_VAR 'val x: kotlin.collections.DoubleIterator declared in .box' type=kotlin.collections.DoubleIterator origin=null - then: RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value="Fail " - GET_VAR 'var i: kotlin.Int declared in .box' type=kotlin.Int origin=null - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - BLOCK type=kotlin.Int origin=POSTFIX_INCR - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var i: kotlin.Int declared in .box' type=kotlin.Int origin=null - SET_VAR 'var i: kotlin.Int declared in .box' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val tmp_0: kotlin.Int declared in .box' type=kotlin.Int origin=null - GET_VAR 'val tmp_0: kotlin.Int declared in .box' type=kotlin.Int origin=null - RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt deleted file mode 100644 index f66e62099da..00000000000 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.kt.txt +++ /dev/null @@ -1,17 +0,0 @@ -fun box(): String { - val a: DoubleArray = DoubleArray(size = 5) - val x: DoubleIterator = a.iterator() - var i: Int = 0 - while (x.hasNext()) { // BLOCK - when { - ieee754equals(arg0 = a.get(index = i), arg1 = x.next()).not() -> return "Fail " + i - } - { // BLOCK - val tmp_0: Int = i - i = tmp_0.inc() - tmp_0 - } /*~> Unit */ - } - return "OK" -} - diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.kt b/compiler/testData/ir/irText/regressions/coercionInLoop.kt index fa0e0c006f8..50b456c1c8d 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.kt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun box(): String { val a = DoubleArray(5) val x = a.iterator() diff --git a/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.fir.ir.txt b/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.fir.ir.txt deleted file mode 100644 index aa2c3936cb0..00000000000 --- a/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.fir.ir.txt +++ /dev/null @@ -1,80 +0,0 @@ -FILE fqName: fileName:/definitelyNotNullWithIntersection1.kt - CLASS CLASS name:In modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> - TYPE_PARAMETER name:I index:0 variance:in superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> () returnType:.In.In> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:In modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:select visibility:public modality:FINAL (x:S of .select, y:S of .select, z:S of .select) returnType:S of .select - TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:x index:0 type:S of .select - VALUE_PARAMETER name:y index:1 type:S of .select - VALUE_PARAMETER name:z index:2 type:S of .select - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun select (x: S of .select, y: S of .select, z: S of .select): S of .select declared in ' - GET_VAR 'x: S of .select declared in .select' type=S of .select origin=null - FUN name:foo visibility:public modality:FINAL (a:kotlin.Array<.In<{T of .foo & Any}>>, b:kotlin.Array<.In>, c:kotlin.Array<.In.foo>>) returnType:kotlin.Boolean - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:a index:0 type:kotlin.Array<.In<{T of .foo & Any}>> - VALUE_PARAMETER name:b index:1 type:kotlin.Array<.In> - VALUE_PARAMETER name:c index:2 type:kotlin.Array<.In.foo>> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (a: kotlin.Array<.In<{T of .foo & Any}>>, b: kotlin.Array<.In>, c: kotlin.Array<.In.foo>>): kotlin.Boolean declared in ' - CALL 'public final fun ofType (y: kotlin.Any?): kotlin.Boolean declared in ' type=kotlin.Boolean origin=null - : kotlin.Any - $receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=.In origin=null - $this: CALL 'public final fun select (x: S of .select, y: S of .select, z: S of .select): S of .select declared in ' type=kotlin.Array.In> origin=null - : kotlin.Array.In> - x: GET_VAR 'a: kotlin.Array<.In<{T of .foo & Any}>> declared in .foo' type=kotlin.Array<.In<{T of .foo & Any}>> origin=null - y: GET_VAR 'b: kotlin.Array<.In> declared in .foo' type=kotlin.Array<.In> origin=null - z: GET_VAR 'c: kotlin.Array<.In.foo>> declared in .foo' type=kotlin.Array<.In.foo>> origin=null - index: CONST Int type=kotlin.Int value=0 - y: CONST Boolean type=kotlin.Boolean value=true - FUN name:ofType visibility:public modality:FINAL ($receiver:.In.ofType>, y:kotlin.Any?) returnType:kotlin.Boolean [inline] - TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] reified:true - $receiver: VALUE_PARAMETER name: type:.In.ofType> - VALUE_PARAMETER name:y index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun ofType (y: kotlin.Any?): kotlin.Boolean declared in ' - TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=K of .ofType - GET_VAR 'y: kotlin.Any? declared in .ofType' type=kotlin.Any? origin=null - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:a1 type:kotlin.Array<.In> [val] - CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array<.In> origin=null - : .In - elements: VARARG type=kotlin.Array.In> varargElementType=.In - CONSTRUCTOR_CALL 'public constructor () declared in .In' type=.In origin=null - : kotlin.Int - VAR name:a2 type:kotlin.Array<.In> [val] - CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array<.In> origin=null - : .In - elements: VARARG type=kotlin.Array.In> varargElementType=.In - CONSTRUCTOR_CALL 'public constructor () declared in .In' type=.In origin=null - : kotlin.String - VAR name:a3 type:kotlin.Array<.In> [val] - CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array<.In> origin=null - : .In - elements: VARARG type=kotlin.Array.In> varargElementType=.In - CONSTRUCTOR_CALL 'public constructor () declared in .In' type=.In origin=null - : kotlin.Int - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun foo (a: kotlin.Array<.In<{T of .foo & Any}>>, b: kotlin.Array<.In>, c: kotlin.Array<.In.foo>>): kotlin.Boolean declared in ' type=kotlin.Boolean origin=null - : kotlin.Int - a: GET_VAR 'val a1: kotlin.Array<.In> declared in .test' type=kotlin.Array<.In> origin=null - b: GET_VAR 'val a2: kotlin.Array<.In> declared in .test' type=kotlin.Array<.In> origin=null - c: GET_VAR 'val a3: kotlin.Array<.In> declared in .test' type=kotlin.Array<.In> origin=null diff --git a/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.kt b/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.kt index f7d9adb3175..9f9645aef6e 100644 --- a/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.kt +++ b/compiler/testData/ir/irText/types/definitelyNotNullWithIntersection1.kt @@ -1,5 +1,6 @@ //!LANGUAGE: +DefinitelyNonNullableTypes // SKIP_KT_DUMP +// FIR_IDENTICAL class In diff --git a/compiler/testData/ir/irText/types/genericFunWithStar.fir.ir.txt b/compiler/testData/ir/irText/types/genericFunWithStar.fir.ir.txt index c8bec37521a..0f086313436 100644 --- a/compiler/testData/ir/irText/types/genericFunWithStar.fir.ir.txt +++ b/compiler/testData/ir/irText/types/genericFunWithStar.fir.ir.txt @@ -79,7 +79,7 @@ FILE fqName: fileName:/genericFunWithStar.kt CALL 'public abstract fun foo (tSerializer: .I.Box.foo>): .I<.Box.Box.foo>> declared in .Box' type=.I.Box.IBase>> origin=null : .IBase $this: GET_VAR ': .Box.Box> declared in .Box.bar' type=.Box.Box> origin=null - tSerializer: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=.I<*> origin=null + tSerializer: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=.I<*> origin=GET_ARRAY_ELEMENT $this: GET_VAR 'serializers: kotlin.Array.I<*>> declared in .Box.bar' type=kotlin.Array.I<*>> origin=null index: CONST Int type=kotlin.Int value=0 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] diff --git a/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt b/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt deleted file mode 100644 index bbf3217bd1b..00000000000 --- a/compiler/testData/ir/irText/types/intersectionType1.fir.ir.txt +++ /dev/null @@ -1,70 +0,0 @@ -FILE fqName: fileName:/intersectionType1.kt - CLASS CLASS name:In modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.In.In> - TYPE_PARAMETER name:I index:0 variance:in superTypes:[kotlin.Any?] reified:false - CONSTRUCTOR visibility:public <> () returnType:.In.In> [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:In modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN name:select visibility:public modality:FINAL (x:S of .select, y:S of .select) returnType:S of .select - TYPE_PARAMETER name:S index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:x index:0 type:S of .select - VALUE_PARAMETER name:y index:1 type:S of .select - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun select (x: S of .select, y: S of .select): S of .select declared in ' - GET_VAR 'x: S of .select declared in .select' type=S of .select origin=null - FUN name:foo visibility:public modality:FINAL (a:kotlin.Array<.In.foo>>, b:kotlin.Array<.In>) returnType:kotlin.Boolean - TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false - VALUE_PARAMETER name:a index:0 type:kotlin.Array<.In.foo>> - VALUE_PARAMETER name:b index:1 type:kotlin.Array<.In> - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun foo (a: kotlin.Array<.In.foo>>, b: kotlin.Array<.In>): kotlin.Boolean declared in ' - CALL 'public final fun ofType (y: kotlin.Any?): kotlin.Boolean declared in ' type=kotlin.Boolean origin=null - : kotlin.Any - $receiver: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=.In origin=null - $this: CALL 'public final fun select (x: S of .select, y: S of .select): S of .select declared in ' type=kotlin.Array.In> origin=null - : kotlin.Array.In> - x: GET_VAR 'a: kotlin.Array<.In.foo>> declared in .foo' type=kotlin.Array<.In.foo>> origin=null - y: GET_VAR 'b: kotlin.Array<.In> declared in .foo' type=kotlin.Array<.In> origin=null - index: CONST Int type=kotlin.Int value=0 - y: CONST Boolean type=kotlin.Boolean value=true - FUN name:ofType visibility:public modality:FINAL ($receiver:.In.ofType>, y:kotlin.Any?) returnType:kotlin.Boolean [inline] - TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] reified:true - $receiver: VALUE_PARAMETER name: type:.In.ofType> - VALUE_PARAMETER name:y index:0 type:kotlin.Any? - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun ofType (y: kotlin.Any?): kotlin.Boolean declared in ' - TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=K of .ofType - GET_VAR 'y: kotlin.Any? declared in .ofType' type=kotlin.Any? origin=null - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:a1 type:kotlin.Array<.In> [val] - CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array<.In> origin=null - : .In - elements: VARARG type=kotlin.Array.In> varargElementType=.In - CONSTRUCTOR_CALL 'public constructor () declared in .In' type=.In origin=null - : kotlin.Int - VAR name:a2 type:kotlin.Array<.In> [val] - CALL 'public final fun arrayOf (vararg elements: T of kotlin.arrayOf): kotlin.Array declared in kotlin' type=kotlin.Array<.In> origin=null - : .In - elements: VARARG type=kotlin.Array.In> varargElementType=.In - CONSTRUCTOR_CALL 'public constructor () declared in .In' type=.In origin=null - : kotlin.String - TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit - CALL 'public final fun foo (a: kotlin.Array<.In.foo>>, b: kotlin.Array<.In>): kotlin.Boolean declared in ' type=kotlin.Boolean origin=null - : kotlin.Int - a: GET_VAR 'val a1: kotlin.Array<.In> declared in .test' type=kotlin.Array<.In> origin=null - b: GET_VAR 'val a2: kotlin.Array<.In> declared in .test' type=kotlin.Array<.In> origin=null diff --git a/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt b/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt deleted file mode 100644 index 7aaeee102a3..00000000000 --- a/compiler/testData/ir/irText/types/intersectionType1.fir.kt.txt +++ /dev/null @@ -1,27 +0,0 @@ -class In { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - -} - -fun select(x: S, y: S): S { - return x -} - -fun foo(a: Array>, b: Array>): Boolean { - return select>>(x = a, y = b).get(index = 0).ofType(y = true) -} - -inline fun In.ofType(y: Any?): Boolean { - return y is K -} - -fun test() { - val a1: Array> = arrayOf>(elements = [In()]) - val a2: Array> = arrayOf>(elements = [In()]) - foo(a = a1, b = a2) /*~> Unit */ -} - diff --git a/compiler/testData/ir/irText/types/intersectionType1.kt b/compiler/testData/ir/irText/types/intersectionType1.kt index 8e9ae4a0244..b3655d2ad0e 100644 --- a/compiler/testData/ir/irText/types/intersectionType1.kt +++ b/compiler/testData/ir/irText/types/intersectionType1.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class In fun select(x: S, y: S): S = x diff --git a/compiler/testData/ir/sourceRanges/postfixIncrementDecrement.fir.txt b/compiler/testData/ir/sourceRanges/postfixIncrementDecrement.fir.txt index 44929ea6697..f3931695687 100644 --- a/compiler/testData/ir/sourceRanges/postfixIncrementDecrement.fir.txt +++ b/compiler/testData/ir/sourceRanges/postfixIncrementDecrement.fir.txt @@ -8,16 +8,16 @@ @3:4..11 SET_VAR 'var y: kotlin.Int [var] declared in .test' type=kotlin.Unit origin=EQ @3:8..11 BLOCK type=kotlin.Int origin=POSTFIX_INCR @3:8..11 VAR IR_TEMPORARY_VARIABLE name: type:kotlin.Int [val] - @3:8..9 GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null + @3:8..9 GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=POSTFIX_INCR @3:8..11 SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Unit origin=POSTFIX_INCR - @3:9..11 CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + @3:9..11 CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR @3:8..11 GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null @3:8..11 GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null @4:4..11 SET_VAR 'var y: kotlin.Int [var] declared in .test' type=kotlin.Unit origin=EQ @4:8..11 BLOCK type=kotlin.Int origin=POSTFIX_DECR @4:8..11 VAR IR_TEMPORARY_VARIABLE name: type:kotlin.Int [val] - @4:8..9 GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null + @4:8..9 GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=POSTFIX_DECR @4:8..11 SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Unit origin=POSTFIX_DECR - @4:9..11 CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null + @4:9..11 CALL 'public final fun dec (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_DECR @4:8..11 GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null @4:8..11 GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt index 8fbd02f8688..19743b3d9ab 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt @@ -437,13 +437,15 @@ private class DebugDiagnosticConsumer( KtFakeSourceElementKind.DelegatingConstructorCall, KtFakeSourceElementKind.ArrayAccessNameReference, KtFakeSourceElementKind.ArrayIndexExpressionReference, - KtFakeSourceElementKind.DesugaredPrefixNameReference, - KtFakeSourceElementKind.DesugaredPostfixNameReference, KtFakeSourceElementKind.DesugaredArrayPlusAssign, KtFakeSourceElementKind.DesugaredArrayMinusAssign, KtFakeSourceElementKind.DesugaredArrayTimesAssign, KtFakeSourceElementKind.DesugaredArrayDivAssign, - KtFakeSourceElementKind.DesugaredArrayRemAssign + KtFakeSourceElementKind.DesugaredArrayRemAssign, + KtFakeSourceElementKind.DesugaredPrefixDec, + KtFakeSourceElementKind.DesugaredPrefixInc, + KtFakeSourceElementKind.DesugaredPostfixDec, + KtFakeSourceElementKind.DesugaredPostfixInc ) } diff --git a/plugins/fir-plugin-prototype/testData/box/composableFunction.fir.ir.txt b/plugins/fir-plugin-prototype/testData/box/composableFunction.fir.ir.txt index 79e8492e9e5..959ff253da8 100644 --- a/plugins/fir-plugin-prototype/testData/box/composableFunction.fir.ir.txt +++ b/plugins/fir-plugin-prototype/testData/box/composableFunction.fir.ir.txt @@ -20,9 +20,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_0: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit @@ -33,9 +33,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_1: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_1: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit @@ -46,9 +46,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_2: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_2: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null VAR name:l3 type:kotlin.Function0 [val] @@ -60,9 +60,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_3: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_3: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit @@ -75,9 +75,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_4: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_4: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null CALL 'public final fun runComposable (block: @[MyComposable] kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -95,9 +95,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_5: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_5: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null CALL 'public final fun runComposable (block: @[MyComposable] kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=null @@ -109,9 +109,9 @@ FILE fqName: fileName:/composableFunction.kt TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] - GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=null + GET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Int origin=POSTFIX_INCR SET_VAR 'var x: kotlin.Int declared in .test_1' type=kotlin.Unit origin=POSTFIX_INCR - CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'val tmp_6: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null GET_VAR 'val tmp_6: kotlin.Int declared in .test_1.' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun test_1 (): kotlin.Int declared in '