From 704e6e96fa0e1d6f64c6a14e9f8b69b0a5a6a293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven=20Sch=C3=A4fer?= Date: Fri, 1 Nov 2019 14:23:17 +0100 Subject: [PATCH] Fir2Ir: Produce IR_TEMPORARY_VARIABLE origins --- .../fir/backend/Fir2IrDeclarationStorage.kt | 5 +- .../localDelegatedProperties.fir.txt | 4 +- .../arrayAugmentedAssignment1.fir.txt | 8 +-- .../augmentedAssignmentWithExpression.fir.txt | 8 +-- .../ir/irText/expressions/bangbang.fir.txt | 30 ++++---- .../breakContinueInLoopHeader.fir.txt | 52 +++++++------- .../expressions/breakContinueInWhen.fir.txt | 24 +++---- .../complexAugmentedAssignment.fir.txt | 36 +++++----- .../irText/expressions/destructuring1.fir.txt | 2 +- .../destructuringWithUnderscore.fir.txt | 2 +- .../ir/irText/expressions/elvis.fir.txt | 30 ++++---- ...eqRhsConditionPossiblyAffectingLhs.fir.txt | 6 +- .../ir/irText/expressions/for.fir.txt | 46 ++++++------ .../expressions/forWithBreakContinue.fir.txt | 60 ++++++++-------- .../forWithImplicitReceivers.fir.txt | 10 +-- .../expressions/incrementDecrement.fir.txt | 70 +++++++++--------- .../javaSyntheticPropertyAccess.fir.txt | 4 +- .../ir/irText/expressions/kt28456.fir.txt | 6 +- .../ir/irText/expressions/kt28456b.fir.txt | 6 +- .../ir/irText/expressions/kt30020.fir.txt | 32 ++++----- .../ir/irText/expressions/kt30796.fir.txt | 72 +++++++++---------- .../ir/irText/expressions/lambdaInCAO.fir.txt | 6 +- .../safeCallWithIncrementDecrement.fir.txt | 10 +-- .../smartCastsWithDestructuring.fir.txt | 6 +- .../irText/expressions/whileDoWhile.fir.txt | 24 +++---- .../ir/irText/lambdas/localFunction.fir.txt | 6 +- .../irText/regressions/coercionInLoop.fir.txt | 6 +- 27 files changed, 287 insertions(+), 284 deletions(-) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index 129ffe2e05f..190202e313e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -615,9 +615,12 @@ class Fir2IrDeclarationStorage( fun createAndSaveIrVariable(variable: FirVariable<*>): IrVariable { val type = variable.returnTypeRef.toIrType(session, this) + // Some temporary variables are produced in RawFirBuilder, but we consistently use special names for them. + val origin = + if (variable.name.isSpecial) IrDeclarationOrigin.IR_TEMPORARY_VARIABLE else IrDeclarationOrigin.DEFINED val irVariable = variable.convertWithOffsets { startOffset, endOffset -> declareIrVariable( - startOffset, endOffset, IrDeclarationOrigin.DEFINED, + startOffset, endOffset, origin, variable.name, type, variable.isVar, isConst = false, isLateinit = false ) } diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt index 139db7ac37d..5ddf5fdb9b7 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.txt @@ -9,11 +9,11 @@ FILE fqName: fileName:/localDelegatedProperties.kt VAR name:x type:IrErrorType [var] SET_VAR 'var x: IrErrorType [var] declared in .test2' type=IrErrorType origin=null CONST Int type=IrErrorType value=0 - VAR name: type:IrErrorType [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:IrErrorType [val] GET_VAR 'var x: IrErrorType [var] declared in .test2' type=IrErrorType origin=null SET_VAR 'var x: IrErrorType [var] declared in .test2' type=IrErrorType origin=null ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'val : IrErrorType [val] declared in .test2' type=IrErrorType origin=null + GET_VAR 'val tmp_0: IrErrorType [val] declared in .test2' type=IrErrorType origin=null CALL 'public final fun plusAssign (element: T of ): kotlin.Unit [inline] declared in kotlin.collections' type=kotlin.Unit origin=null $receiver: GET_VAR 'var x: IrErrorType [var] declared in .test2' type=IrErrorType origin=null element: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.txt index 603fe7fb46d..459e5339a62 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.fir.txt @@ -48,13 +48,13 @@ FILE fqName: fileName:/arrayAugmentedAssignment1.kt ERROR_CALL 'FirArraySetCall (resolve isn't supported yet)' type=kotlin.Unit FUN name:testCall visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name: type:kotlin.IntArray [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val] CALL 'public final fun foo (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null ERROR_CALL 'FirArraySetCall (resolve isn't supported yet)' type=kotlin.Unit FUN name:testMember visibility:public modality:FINAL <> (c:.C) returnType:kotlin.Unit VALUE_PARAMETER name:c index:0 type:.C BLOCK_BODY - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.IntArray declared in .C' type=kotlin.IntArray origin=null $this: GET_VAR 'c: .C declared in .testMember' type=.C origin=null @@ -64,5 +64,5 @@ FILE fqName: fileName:/arrayAugmentedAssignment1.kt $this: GET_VAR 'c: .C declared in .testMember' type=.C origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testMember' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testMember' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .testMember' type=kotlin.Int origin=null + GET_VAR 'val tmp_1: kotlin.Int [val] declared in .testMember' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt index 072fd5423ee..762043a3876 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.txt @@ -40,15 +40,15 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt x: CONST Int type=kotlin.Int value=1 FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name: type:.Host [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.Host [val] CALL 'public final fun foo (): .Host declared in ' type=.Host origin=null - SET_VAR 'val : .Host [val] declared in .test3' type=.Host origin=null + SET_VAR 'val tmp_0: .Host [val] declared in .test3' type=.Host origin=null CONST Int type=.Host value=1 FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0<.Host>) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0<.Host> BLOCK_BODY - VAR name: type:.Host [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.Host [val] CALL 'public abstract fun invoke (): .Host declared in kotlin.Function0' type=.Host origin=null $this: GET_VAR 'a: kotlin.Function0<.Host> declared in .test4' type=kotlin.Function0<.Host> origin=null - SET_VAR 'val : .Host [val] declared in .test4' type=.Host origin=null + SET_VAR 'val tmp_1: .Host [val] declared in .test4' type=.Host origin=null CONST Int type=.Host value=1 diff --git a/compiler/testData/ir/irText/expressions/bangbang.fir.txt b/compiler/testData/ir/irText/expressions/bangbang.fir.txt index 0ba9f82bc71..aa5026ea74a 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.fir.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.fir.txt @@ -4,54 +4,54 @@ FILE fqName: fileName:/bangbang.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=EXCLEXCL - VAR name: type:kotlin.Any? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val] GET_VAR 'a: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null WHEN type=kotlin.Any origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null + arg0: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Any?) returnType:kotlin.Int VALUE_PARAMETER name:a index:0 type:kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.Any?): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=EXCLEXCL - VAR name: type:kotlin.Int? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int? [val] CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int? origin=null $this: GET_VAR 'a: kotlin.Any? declared in .test2' type=kotlin.Any? origin=null WHEN type=kotlin.Int origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Int? [val] declared in .test2' type=kotlin.Int? origin=null + arg0: GET_VAR 'val tmp_1: kotlin.Int? [val] declared in .test2' type=kotlin.Int? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Int? [val] declared in .test2' type=kotlin.Int origin=null + then: GET_VAR 'val tmp_1: kotlin.Int? [val] declared in .test2' type=kotlin.Int origin=null FUN name:test3 visibility:public modality:FINAL (a:X of .test3) returnType:kotlin.Any TYPE_PARAMETER name:X index:0 variance: superTypes:[] VALUE_PARAMETER name:a index:0 type:X of .test3 BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test3 (a: X of .test3): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=EXCLEXCL - VAR name: type:X of .test3 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:X of .test3 [val] GET_VAR 'a: X of .test3 declared in .test3' type=X of .test3 origin=null WHEN type=kotlin.Any origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : X of .test3 [val] declared in .test3' type=X of .test3 origin=null + arg0: GET_VAR 'val tmp_2: X of .test3 [val] declared in .test3' type=X of .test3 origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : X of .test3 [val] declared in .test3' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_2: X of .test3 [val] declared in .test3' type=kotlin.Any origin=null FUN name:useString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit VALUE_PARAMETER name:s index:0 type:kotlin.String BLOCK_BODY @@ -64,33 +64,33 @@ FILE fqName: fileName:/bangbang.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String? GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null then: BLOCK type=kotlin.String origin=EXCLEXCL - VAR name: type:kotlin.String? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.String? [val] GET_VAR 'a: X of .test4 declared in .test4' type=kotlin.String? origin=null WHEN type=kotlin.String origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null + arg0: GET_VAR 'val tmp_3: kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String origin=null + then: GET_VAR 'val tmp_3: kotlin.String? [val] declared in .test4' type=kotlin.String origin=null WHEN type=kotlin.Unit origin=IF BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String? GET_VAR 'a: X of .test4 declared in .test4' type=X of .test4 origin=null then: CALL 'public final fun useString (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null s: BLOCK type=kotlin.String origin=EXCLEXCL - VAR name: type:kotlin.String? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.String? [val] GET_VAR 'a: X of .test4 declared in .test4' type=kotlin.String? origin=null WHEN type=kotlin.String origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null + arg0: GET_VAR 'val tmp_4: kotlin.String? [val] declared in .test4' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.String? [val] declared in .test4' type=kotlin.String origin=null + then: GET_VAR 'val tmp_4: kotlin.String? [val] declared in .test4' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt index 8f60da1416a..f3d7ac36909 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.fir.txt @@ -7,17 +7,17 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit origin=null WHILE label=L2 origin=WHILE_LOOP condition: BLOCK type=kotlin.Boolean origin=ELVIS - VAR name: type:kotlin.Boolean? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Boolean? [val] GET_VAR 'c: kotlin.Boolean? declared in .test1' type=kotlin.Boolean? origin=null WHEN type=kotlin.Boolean origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean? origin=null + arg0: GET_VAR 'val tmp_0: kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: BREAK label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean origin=null + then: GET_VAR 'val tmp_0: kotlin.Boolean? [val] declared in .test1' type=kotlin.Boolean origin=null body: BLOCK type=kotlin.Unit origin=null FUN name:test2 visibility:public modality:FINAL <> (c:kotlin.Boolean?) returnType:kotlin.Unit VALUE_PARAMETER name:c index:0 type:kotlin.Boolean? @@ -27,17 +27,17 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit origin=null WHILE label=L2 origin=WHILE_LOOP condition: BLOCK type=kotlin.Boolean origin=ELVIS - VAR name: type:kotlin.Boolean? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Boolean? [val] GET_VAR 'c: kotlin.Boolean? declared in .test2' type=kotlin.Boolean? origin=null WHEN type=kotlin.Boolean origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean? origin=null + arg0: GET_VAR 'val tmp_1: kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONTINUE label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean origin=null + then: GET_VAR 'val tmp_1: kotlin.Boolean? [val] declared in .test2' type=kotlin.Boolean origin=null body: BLOCK type=kotlin.Unit origin=null FUN name:test3 visibility:public modality:FINAL <> (ss:kotlin.collections.List?) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List? @@ -45,58 +45,58 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt WHILE label=L origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.collections.List [val] BLOCK type=kotlin.collections.List origin=ELVIS - VAR name: type:kotlin.collections.List? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test3' type=kotlin.collections.List? origin=null WHEN type=kotlin.collections.List origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List? origin=null + arg0: GET_VAR 'val tmp_3: kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONTINUE label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + then: GET_VAR 'val tmp_3: kotlin.collections.List? [val] declared in .test3' type=kotlin.collections.List origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .test3' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_2: kotlin.collections.List [val] declared in .test3' type=kotlin.collections.List origin=null WHILE label=L2 origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .test3' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator [val] declared in .test3' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .test3' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_4: kotlin.collections.Iterator [val] declared in .test3' type=kotlin.collections.Iterator origin=null FUN name:test4 visibility:public modality:FINAL <> (ss:kotlin.collections.List?) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List? BLOCK_BODY WHILE label=L origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.collections.List [val] BLOCK type=kotlin.collections.List origin=ELVIS - VAR name: type:kotlin.collections.List? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.collections.List? [val] GET_VAR 'ss: kotlin.collections.List? declared in .test4' type=kotlin.collections.List? origin=null WHEN type=kotlin.collections.List origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List? origin=null + arg0: GET_VAR 'val tmp_6: kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: BREAK label=null loop.label=L BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + then: GET_VAR 'val tmp_6: kotlin.collections.List? [val] declared in .test4' type=kotlin.collections.List origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .test4' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_5: kotlin.collections.List [val] declared in .test4' type=kotlin.collections.List origin=null WHILE label=L2 origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .test4' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_7: kotlin.collections.Iterator [val] declared in .test4' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .test4' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_7: kotlin.collections.Iterator [val] declared in .test4' type=kotlin.collections.Iterator origin=null FUN name:test5 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:i type:kotlin.Int [var] @@ -104,21 +104,21 @@ FILE fqName: fileName:/breakContinueInLoopHeader.kt WHILE label=Outer origin=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value=true body: BLOCK type=kotlin.Unit origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null SET_VAR 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test5' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_8: kotlin.Int [val] declared in .test5' type=kotlin.Int origin=null GET_VAR 'var i: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null VAR name:j type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 DO_WHILE label=Inner origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val] GET_VAR 'var j: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null SET_VAR 'var j: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test5' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_9: kotlin.Int [val] declared in .test5' type=kotlin.Int origin=null GET_VAR 'var j: kotlin.Int [var] declared in .test5' type=kotlin.Int origin=null condition: WHEN type=kotlin.Boolean origin=IF BRANCH diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt index 489343962ca..71ad45a470c 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.txt @@ -11,18 +11,18 @@ FILE fqName: fileName:/breakContinueInWhen.kt GET_VAR 'i: kotlin.Int declared in .testBreakFor.' type=kotlin.Int origin=null VAR name:k type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 - VAR name: type:kotlin.IntArray [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.IntArray [val] GET_VAR 'val xs: kotlin.IntArray [val] declared in .testBreakFor' type=kotlin.IntArray origin=null - VAR name: type:kotlin.collections.IntIterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.IntIterator [val] CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null - $this: GET_VAR 'val : kotlin.IntArray [val] declared in .testBreakFor' type=kotlin.IntArray origin=null + $this: GET_VAR 'val tmp_0: kotlin.IntArray [val] declared in .testBreakFor' type=kotlin.IntArray origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in .testBreakFor' type=kotlin.collections.IntIterator origin=null 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 @@ -69,18 +69,18 @@ FILE fqName: fileName:/breakContinueInWhen.kt GET_VAR 'i: kotlin.Int declared in .testContinueFor.' type=kotlin.Int origin=null VAR name:k type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 - VAR name: type:kotlin.IntArray [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.IntArray [val] GET_VAR 'val xs: kotlin.IntArray [val] declared in .testContinueFor' type=kotlin.IntArray origin=null - VAR name: type:kotlin.collections.IntIterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.IntIterator [val] CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null - $this: GET_VAR 'val : kotlin.IntArray [val] declared in .testContinueFor' type=kotlin.IntArray origin=null + $this: GET_VAR 'val tmp_2: kotlin.IntArray [val] declared in .testContinueFor' type=kotlin.IntArray origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:x type:kotlin.Int [val] CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.IntIterator [val] declared in .testContinueFor' type=kotlin.collections.IntIterator origin=null 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 @@ -109,11 +109,11 @@ FILE fqName: fileName:/breakContinueInWhen.kt CONST String type=kotlin.String value="" DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null SET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testContinueDoWhile' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in .testContinueDoWhile' type=kotlin.Int origin=null GET_VAR 'var k: kotlin.Int [var] declared in .testContinueDoWhile' type=kotlin.Int origin=null WHEN type=kotlin.Unit origin=WHEN BRANCH diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt index 13cd5e1af71..e9f8928abea 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.txt @@ -118,54 +118,54 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt BLOCK_BODY VAR name:i type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null $this: GET_VAR 'a: kotlin.IntArray declared in .test1' type=kotlin.IntArray origin=null index: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .test1' type=kotlin.Int origin=null SET_VAR 'var i: kotlin.Int [var] declared in .test1' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + GET_VAR 'val tmp_1: kotlin.Int [val] 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 $this: GET_VAR 'a: kotlin.IntArray declared in .test1' type=kotlin.IntArray origin=null index: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .test1' type=kotlin.Int origin=null SET_VAR 'var i: kotlin.Int [var] declared in .test1' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + GET_VAR 'val tmp_2: kotlin.Int [val] 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 - $this: GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test1' type=kotlin.Int origin=null FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x1 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_OBJECT 'CLASS OBJECT name:X1 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + $this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + GET_VAR 'val tmp_3: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1.X2' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x2 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_OBJECT 'CLASS OBJECT name:X2 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + $this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + GET_VAR 'val tmp_4: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .X1.X2.X3' type=kotlin.Int origin=null $this: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x3 type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_OBJECT 'CLASS OBJECT name:X3 modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X1.X2.X3 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_5: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null + GET_VAR 'val tmp_5: kotlin.Int [val] declared in .test2' type=kotlin.Int origin=null CLASS CLASS name:B modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.B CONSTRUCTOR visibility:public <> (s:kotlin.Int) returnType:.B [primary] diff --git a/compiler/testData/ir/irText/expressions/destructuring1.fir.txt b/compiler/testData/ir/irText/expressions/destructuring1.fir.txt index 0e7b3dc5599..e22077af4c4 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.fir.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.fir.txt @@ -52,7 +52,7 @@ FILE fqName: fileName:/destructuring1.kt FUN name:test visibility:public modality:FINAL <> ($receiver:.B) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.B BLOCK_BODY - VAR name: type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A VAR name:x type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int declared in .B' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.txt b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.txt index 3a88edcc09e..e05b37ea3be 100644 --- a/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.txt +++ b/compiler/testData/ir/irText/expressions/destructuringWithUnderscore.fir.txt @@ -58,7 +58,7 @@ FILE fqName: fileName:/destructuringWithUnderscore.kt FUN name:test visibility:public modality:FINAL <> ($receiver:.B) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.B BLOCK_BODY - VAR name: type:.A [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.A [val] GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.A VAR name:x type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int declared in .B' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/elvis.fir.txt b/compiler/testData/ir/irText/expressions/elvis.fir.txt index e916d3367da..958ad31f503 100644 --- a/compiler/testData/ir/irText/expressions/elvis.fir.txt +++ b/compiler/testData/ir/irText/expressions/elvis.fir.txt @@ -18,34 +18,34 @@ FILE fqName: fileName:/elvis.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1 (a: kotlin.Any?, b: kotlin.Any): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:kotlin.Any? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Any? [val] GET_VAR 'a: kotlin.Any? declared in .test1' type=kotlin.Any? origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null + arg0: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test1' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'b: kotlin.Any declared in .test1' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_0: kotlin.Any? [val] declared in .test1' type=kotlin.Any origin=null FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.String?, b:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:a index:0 type:kotlin.String? VALUE_PARAMETER name:b index:1 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test2 (a: kotlin.String?, b: kotlin.Any): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:kotlin.String? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val] GET_VAR 'a: kotlin.String? declared in .test2' type=kotlin.String? origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null + arg0: GET_VAR 'val tmp_1: kotlin.String? [val] declared in .test2' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'b: kotlin.Any declared in .test2' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.String? [val] declared in .test2' type=kotlin.String origin=null + then: GET_VAR 'val tmp_1: kotlin.String? [val] declared in .test2' type=kotlin.String origin=null FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any?, b:kotlin.Any?) returnType:kotlin.String VALUE_PARAMETER name:a index:0 type:kotlin.Any? VALUE_PARAMETER name:b index:1 type:kotlin.Any? @@ -64,46 +64,46 @@ FILE fqName: fileName:/elvis.kt CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='public final fun test3 (a: kotlin.Any?, b: kotlin.Any?): kotlin.String declared in ' BLOCK type=kotlin.String origin=ELVIS - VAR name: type:kotlin.String? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.String? [val] GET_VAR 'a: kotlin.Any? declared in .test3' type=kotlin.String? origin=null WHEN type=kotlin.String origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null + arg0: GET_VAR 'val tmp_2: kotlin.String? [val] declared in .test3' type=kotlin.String? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'b: kotlin.Any? declared in .test3' type=kotlin.String origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.String? [val] declared in .test3' type=kotlin.String origin=null + then: GET_VAR 'val tmp_2: kotlin.String? [val] declared in .test3' type=kotlin.String origin=null FUN name:test4 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test4 (x: kotlin.Any): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:kotlin.Any? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Any? [val] CALL 'public final fun (): kotlin.Any? declared in ' type=kotlin.Any? origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Any? [val] declared in .test4' type=kotlin.Any? origin=null + arg0: GET_VAR 'val tmp_3: kotlin.Any? [val] declared in .test4' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'x: kotlin.Any declared in .test4' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test4' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_3: kotlin.Any? [val] declared in .test4' type=kotlin.Any origin=null FUN name:test5 visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any VALUE_PARAMETER name:x index:0 type:kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test5 (x: kotlin.Any): kotlin.Any declared in ' BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:kotlin.Any? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Any? [val] CALL 'public final fun foo (): kotlin.Any? declared in ' type=kotlin.Any? origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Any? [val] declared in .test5' type=kotlin.Any? origin=null + arg0: GET_VAR 'val tmp_4: kotlin.Any? [val] declared in .test5' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'x: kotlin.Any declared in .test5' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any? [val] declared in .test5' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_4: kotlin.Any? [val] declared in .test5' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt index dbd07010078..deb53faa298 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/eqeqRhsConditionPossiblyAffectingLhs.fir.txt @@ -10,18 +10,18 @@ FILE fqName: fileName:/eqeqRhsConditionPossiblyAffectingLhs.kt if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test' type=kotlin.Any origin=null then: BLOCK type=kotlin.Nothing origin=EXCLEXCL - VAR name: type:kotlin.Nothing? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Nothing? [val] CONST Null type=kotlin.Nothing? value=null WHEN type=kotlin.Nothing origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing? origin=null + arg0: GET_VAR 'val tmp_0: kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing ERROR_CALL 'Unresolved reference: #' type=IrErrorType BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing origin=null + then: GET_VAR 'val tmp_0: kotlin.Nothing? [val] declared in .test' type=kotlin.Nothing origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'x: kotlin.Any declared in .test' type=kotlin.Double origin=null diff --git a/compiler/testData/ir/irText/expressions/for.fir.txt b/compiler/testData/ir/irText/expressions/for.fir.txt index ba1b88008ba..089ee7ccf96 100644 --- a/compiler/testData/ir/irText/expressions/for.fir.txt +++ b/compiler/testData/ir/irText/expressions/for.fir.txt @@ -2,73 +2,73 @@ FILE fqName: fileName:/for.kt FUN name:testEmpty visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testEmpty' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testEmpty' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_0: kotlin.collections.List [val] declared in .testEmpty' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testEmpty' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator [val] declared in .testEmpty' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testEmpty' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator [val] declared in .testEmpty' type=kotlin.collections.Iterator origin=null FUN name:testIterable visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testIterable' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testIterable' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_2: kotlin.collections.List [val] declared in .testIterable' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testIterable' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.Iterator [val] declared in .testIterable' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testIterable' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.Iterator [val] declared in .testIterable' type=kotlin.collections.Iterator origin=null CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null message: GET_VAR 'val s: kotlin.String [val] declared in .testIterable' type=kotlin.String origin=null FUN name:testDestructuring visibility:public modality:FINAL <> (pp:kotlin.collections.List>) returnType:kotlin.Unit VALUE_PARAMETER name:pp index:0 type:kotlin.collections.List> BLOCK_BODY - VAR name: type:kotlin.collections.List> [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.collections.List> [val] GET_VAR 'pp: kotlin.collections.List> declared in .testDestructuring' type=kotlin.collections.List> origin=null - VAR name: type:kotlin.collections.Iterator> [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.collections.Iterator> [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator> declared in kotlin.collections.List' type=kotlin.collections.Iterator> origin=null - $this: GET_VAR 'val : kotlin.collections.List> [val] declared in .testDestructuring' type=kotlin.collections.List> origin=null + $this: GET_VAR 'val tmp_4: kotlin.collections.List> [val] declared in .testDestructuring' type=kotlin.collections.List> origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator> [val] declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null + $this: GET_VAR 'val tmp_5: kotlin.collections.Iterator> [val] declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null body: BLOCK type=kotlin.Unit origin=null - VAR name: type:kotlin.Pair [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Pair [val] CALL 'public abstract fun next (): kotlin.Pair declared in kotlin.collections.Iterator' type=kotlin.Pair origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator> [val] declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null + $this: GET_VAR 'val tmp_5: kotlin.collections.Iterator> [val] declared in .testDestructuring' type=kotlin.collections.Iterator> origin=null VAR name:i type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int declared in kotlin.Pair' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Pair [val] declared in .testDestructuring' type=kotlin.Pair origin=null + $this: GET_VAR 'val tmp_6: kotlin.Pair [val] declared in .testDestructuring' type=kotlin.Pair origin=null VAR name:s type:kotlin.String [val] CALL 'public final fun component2 (): kotlin.String declared in kotlin.Pair' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.Pair [val] declared in .testDestructuring' type=kotlin.Pair origin=null + $this: GET_VAR 'val tmp_6: kotlin.Pair [val] declared in .testDestructuring' type=kotlin.Pair origin=null CALL 'public final fun println (message: kotlin.Int): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null message: GET_VAR 'val i: kotlin.Int [val] declared in .testDestructuring' type=kotlin.Int origin=null CALL 'public final fun println (message: kotlin.Any?): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null message: GET_VAR 'val s: kotlin.String [val] declared in .testDestructuring' type=kotlin.String origin=null FUN name:testRange visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name: type:kotlin.ranges.IntRange [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.ranges.IntRange [val] CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=null $this: CONST Int type=kotlin.Int value=1 other: CONST Int type=kotlin.Int value=10 - VAR name: type:kotlin.collections.IntIterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.collections.IntIterator [val] CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntProgression' type=kotlin.collections.IntIterator origin=null - $this: GET_VAR 'val : kotlin.ranges.IntRange [val] declared in .testRange' type=kotlin.ranges.IntRange origin=null + $this: GET_VAR 'val tmp_7: kotlin.ranges.IntRange [val] declared in .testRange' type=kotlin.ranges.IntRange origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testRange' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_8: kotlin.collections.IntIterator [val] declared in .testRange' type=kotlin.collections.IntIterator origin=null body: BLOCK type=kotlin.Unit origin=null VAR name:i type:kotlin.Int [val] CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.collections.IntIterator [val] declared in .testRange' type=kotlin.collections.IntIterator origin=null + $this: GET_VAR 'val tmp_8: kotlin.collections.IntIterator [val] declared in .testRange' type=kotlin.collections.IntIterator origin=null diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt index 8c44f37c51f..7db52604b7b 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.fir.txt @@ -2,46 +2,46 @@ FILE fqName: fileName:/forWithBreakContinue.kt FUN name:testForBreak1 visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForBreak1' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForBreak1' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_0: kotlin.collections.List [val] declared in .testForBreak1' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak1' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator [val] declared in .testForBreak1' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak1' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_1: kotlin.collections.Iterator [val] declared in .testForBreak1' type=kotlin.collections.Iterator origin=null BREAK label=null loop.label=null FUN name:testForBreak2 visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForBreak2' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForBreak2' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_2: kotlin.collections.List [val] declared in .testForBreak2' type=kotlin.collections.List origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_3: kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s1 type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null - VAR name: type:kotlin.collections.List [val] + $this: GET_VAR 'val tmp_3: kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForBreak2' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForBreak2' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_4: kotlin.collections.List [val] declared in .testForBreak2' type=kotlin.collections.List origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_5: kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s2 type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_5: kotlin.collections.Iterator [val] declared in .testForBreak2' type=kotlin.collections.Iterator origin=null BREAK label=OUTER loop.label=OUTER BREAK label=INNER loop.label=INNER BREAK label=null loop.label=INNER @@ -49,46 +49,46 @@ FILE fqName: fileName:/forWithBreakContinue.kt FUN name:testForContinue1 visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForContinue1' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForContinue1' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_6: kotlin.collections.List [val] declared in .testForContinue1' type=kotlin.collections.List origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue1' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_7: kotlin.collections.Iterator [val] declared in .testForContinue1' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue1' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_7: kotlin.collections.Iterator [val] declared in .testForContinue1' type=kotlin.collections.Iterator origin=null CONTINUE label=null loop.label=null FUN name:testForContinue2 visibility:public modality:FINAL <> (ss:kotlin.collections.List) returnType:kotlin.Unit VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List BLOCK_BODY - VAR name: type:kotlin.collections.List [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForContinue2' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForContinue2' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_8: kotlin.collections.List [val] declared in .testForContinue2' type=kotlin.collections.List origin=null WHILE label=OUTER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_9: kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s1 type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null - VAR name: type:kotlin.collections.List [val] + $this: GET_VAR 'val tmp_9: kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.collections.List [val] GET_VAR 'ss: kotlin.collections.List declared in .testForContinue2' type=kotlin.collections.List origin=null - VAR name: type:kotlin.collections.Iterator [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.collections.Iterator [val] CALL 'public abstract fun iterator (): kotlin.collections.Iterator declared in kotlin.collections.List' type=kotlin.collections.Iterator origin=null - $this: GET_VAR 'val : kotlin.collections.List [val] declared in .testForContinue2' type=kotlin.collections.List origin=null + $this: GET_VAR 'val tmp_10: kotlin.collections.List [val] declared in .testForContinue2' type=kotlin.collections.List origin=null WHILE label=INNER origin=FOR_LOOP_INNER_WHILE condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.Iterator' type=kotlin.Boolean origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_11: kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null body: BLOCK type=kotlin.Nothing origin=null VAR name:s2 type:kotlin.String [val] CALL 'public abstract fun next (): kotlin.String declared in kotlin.collections.Iterator' type=kotlin.String origin=null - $this: GET_VAR 'val : kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null + $this: GET_VAR 'val tmp_11: kotlin.collections.Iterator [val] declared in .testForContinue2' type=kotlin.collections.Iterator origin=null CONTINUE label=OUTER loop.label=OUTER CONTINUE label=INNER loop.label=INNER CONTINUE label=null loop.label=INNER diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt index 857612a5fb1..5f1c370f7db 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.fir.txt @@ -81,14 +81,14 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public open fun next (): kotlin.Int declared in .IReceiver' BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in .IntCell' type=kotlin.Int origin=null $this: GET_VAR ': .IntCell declared in .IntCell' type=.IntCell origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:value type:kotlin.Int visibility:private' type=kotlin.Unit origin=null receiver: GET_VAR ': .IntCell declared in .IntCell' type=.IntCell origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .IReceiver.next' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] 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] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any @@ -105,9 +105,9 @@ FILE fqName: fileName:/forWithImplicitReceivers.kt FUN name:test visibility:public modality:FINAL <> ($receiver:.IReceiver) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.IReceiver BLOCK_BODY - VAR name: type:.FiveTimes [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:.FiveTimes [val] GET_OBJECT 'CLASS OBJECT name:FiveTimes modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.FiveTimes - VAR name: type:.IntCell [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:.IntCell [val] CALL 'public open fun iterator (): .IntCell declared in .IReceiver' type=.IntCell origin=null $this: GET_VAR ': .IReceiver declared in .IReceiver' type=.IReceiver origin=null WHILE label=null origin=FOR_LOOP_INNER_WHILE diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt index c224116f406..afffb49c7d7 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.fir.txt @@ -32,19 +32,19 @@ FILE fqName: fileName:/incrementDecrement.kt CONST Int type=kotlin.Int value=0 VAR name:x1 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testVarPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .testVarPrefix' type=kotlin.Int origin=null GET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null VAR name:x2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testVarPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .testVarPrefix' type=kotlin.Int origin=null GET_VAR 'var x: kotlin.Int [var] declared in .testVarPrefix' type=kotlin.Int origin=null FUN name:testVarPostfix visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY @@ -52,91 +52,91 @@ FILE fqName: fileName:/incrementDecrement.kt CONST Int type=kotlin.Int value=0 VAR name:x1 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .testVarPostfix' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .testVarPostfix' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null + GET_VAR 'val tmp_2: kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null VAR name:x2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .testVarPostfix' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .testVarPostfix' type=kotlin.Int origin=null CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in .testVarPostfix' type=kotlin.Int origin=null + GET_VAR 'val tmp_3: kotlin.Int [val] 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 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_4: kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null VAR name:p2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_5: kotlin.Int [val] declared in .testPropPrefix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null 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 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_6: kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null + GET_VAR 'val tmp_6: kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null VAR name:p2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val] CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=null SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:p type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=null value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_7: kotlin.Int [val] declared in .testPropPostfix' type=kotlin.Int origin=null CALL 'public final fun (): kotlin.Int declared in ' 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 - VAR name: type:kotlin.Int [val] + 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 $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:kotlin.Int [val] CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_8: kotlin.Int [val] declared in .testArrayPrefix' 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 $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 - value: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + value: GET_VAR 'val tmp_9: kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + GET_VAR 'val tmp_9: kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + 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 $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val] CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_10: kotlin.Int [val] declared in .testArrayPrefix' 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 $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 - value: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + value: GET_VAR 'val tmp_11: kotlin.Int [val] declared in .testArrayPrefix' type=kotlin.Int origin=null + GET_VAR 'val tmp_11: kotlin.Int [val] 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 - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in kotlin.IntArray' type=kotlin.Int origin=null $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 @@ -144,11 +144,11 @@ FILE fqName: fileName:/incrementDecrement.kt $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_12: kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null + GET_VAR 'val tmp_12: kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null VAR name:a2 type:kotlin.Int [val] BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + 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 $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 @@ -156,5 +156,5 @@ FILE fqName: fileName:/incrementDecrement.kt $this: CALL 'public final fun (): kotlin.IntArray declared in ' type=kotlin.IntArray origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun dec (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_13: kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null + GET_VAR 'val tmp_13: kotlin.Int [val] declared in .testArrayPostfix' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt index 89512d640a5..a3d42fa4e9d 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.txt @@ -5,9 +5,9 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'j: .J declared in .test' type=.J origin=null ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'j: .J declared in .test' type=.J origin=null ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null ERROR_CALL 'Unresolved reference: R|/J.foo|' type=IrErrorType diff --git a/compiler/testData/ir/irText/expressions/kt28456.fir.txt b/compiler/testData/ir/irText/expressions/kt28456.fir.txt index 87f62ab004b..1ffc4058f27 100644 --- a/compiler/testData/ir/irText/expressions/kt28456.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28456.fir.txt @@ -43,7 +43,7 @@ FILE fqName: fileName:/kt28456.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: .A): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] ERROR_CALL 'Cannot bind 2 arguments to get call with 1 parameters' type=kotlin.Int CONST Int type=kotlin.Int value=1 CONST Int type=kotlin.Int value=2 @@ -52,8 +52,8 @@ FILE fqName: fileName:/kt28456.kt i: CONST Int type=kotlin.Int value=1 j: CONST Int type=kotlin.Int value=2 v: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/kt28456b.fir.txt b/compiler/testData/ir/irText/expressions/kt28456b.fir.txt index acf20276722..b6ff94f100e 100644 --- a/compiler/testData/ir/irText/expressions/kt28456b.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt28456b.fir.txt @@ -55,15 +55,15 @@ FILE fqName: fileName:/kt28456b.kt BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun testPostfixIncrement (a: .A): kotlin.Int declared in ' BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 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 $receiver: GET_VAR 'a: .A declared in .testPostfixIncrement' type=.A origin=null i: CONST Int type=kotlin.Int value=1 ERROR_CALL 'Unresolved reference: #' type=IrErrorType CONST Int type=kotlin.Int value=1 CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .testPostfixIncrement' type=kotlin.Int origin=null FUN name:testCompoundAssignment visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index ca3ce360288..8470958f34b 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -28,56 +28,56 @@ FILE fqName: fileName:/kt30020.kt $receiver: CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null element: CONST Int type=kotlin.Int value=1 - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.collections.MutableList [val] CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val tmp_0: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=2 - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.collections.MutableList [val] TYPE_OP type=kotlin.collections.MutableList origin=CAST typeOperand=kotlin.collections.MutableList CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val tmp_1: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=3 - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.collections.MutableList [val] TYPE_OP type=kotlin.collections.MutableList origin=CAST typeOperand=kotlin.collections.MutableList CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val tmp_2: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=4 - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.collections.MutableList [val] BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.collections.MutableList [val] CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'nx: .X? declared in .test' type=.X? origin=null WHEN type=kotlin.collections.MutableList origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + arg0: GET_VAR 'val tmp_4: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing CONSTRUCTOR_CALL 'public constructor () declared in kotlin.KotlinNullPointerException' type=kotlin.KotlinNullPointerException origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + then: GET_VAR 'val tmp_4: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val tmp_3: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=5 - VAR name: type:kotlin.collections.MutableList [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:kotlin.collections.MutableList [val] BLOCK type=kotlin.collections.MutableList origin=EXCLEXCL - VAR name: type:kotlin.collections.MutableList? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:kotlin.collections.MutableList? [val] CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList? origin=null $this: GET_VAR 'nx: .X? declared in .test' type=.X origin=null WHEN type=kotlin.collections.MutableList origin=EXCLEXCL BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList? origin=null + arg0: GET_VAR 'val tmp_6: kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList? origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: THROW type=kotlin.Nothing CONSTRUCTOR_CALL 'public constructor () declared in kotlin.KotlinNullPointerException' type=kotlin.KotlinNullPointerException origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList origin=null - SET_VAR 'val : kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null + then: GET_VAR 'val tmp_6: kotlin.collections.MutableList? [val] declared in .test' type=kotlin.collections.MutableList origin=null + SET_VAR 'val tmp_5: kotlin.collections.MutableList [val] declared in .test' type=kotlin.collections.MutableList origin=null CONST Int type=kotlin.collections.MutableList value=6 FUN name:testExtensionReceiver visibility:public modality:FINAL <> ($receiver:kotlin.collections.MutableList) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:kotlin.collections.MutableList diff --git a/compiler/testData/ir/irText/expressions/kt30796.fir.txt b/compiler/testData/ir/irText/expressions/kt30796.fir.txt index e0c2dab2e11..a9e1000b74b 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.fir.txt @@ -12,150 +12,150 @@ FILE fqName: fileName:/kt30796.kt BLOCK_BODY VAR name:x1 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_0: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_0: T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x2 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_1: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:T of .test [val] GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_2: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_2: T of .test [val] declared in .test' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_1: T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x3 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:T of .test [val] BLOCK type=T of .test origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null WHEN type=T of .test origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_4: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_4: T of .test [val] declared in .test' type=kotlin.Any origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_3: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_3: T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x4 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:T of .test [val] BLOCK type=T of .test origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_6 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null WHEN type=T of .test origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_6: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'value2: T of .test declared in .test' type=T of .test origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_6: T of .test [val] declared in .test' type=kotlin.Any origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_5: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_5: T of .test [val] declared in .test' type=kotlin.Any origin=null VAR name:x5 type:kotlin.Any [val] BLOCK type=kotlin.Int origin=ELVIS - VAR name: type:kotlin.Nothing [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Nothing [val] CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Nothing origin=null : WHEN type=kotlin.Int origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null + arg0: GET_VAR 'val tmp_7: kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null + then: GET_VAR 'val tmp_7: kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null VAR name:x6 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:kotlin.Any [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_8 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_9 type:T of .test [val] GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_9: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Any origin=null : BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_9: T of .test [val] declared in .test' type=kotlin.Any origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Any [val] declared in .test' type=kotlin.Any origin=null + arg0: GET_VAR 'val tmp_8: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Any [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_8: kotlin.Any [val] declared in .test' type=kotlin.Any origin=null VAR name:x7 type:kotlin.Any [val] BLOCK type=kotlin.Any origin=ELVIS - VAR name: type:T of .test [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:T of .test [val] BLOCK type=T of .test origin=ELVIS - VAR name: type:kotlin.Nothing [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Nothing [val] CALL 'public final fun magic (): T of .magic declared in ' type=kotlin.Nothing origin=null : WHEN type=T of .test origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null + arg0: GET_VAR 'val tmp_11: kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: GET_VAR 'value: T of .test declared in .test' type=T of .test origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null + then: GET_VAR 'val tmp_11: kotlin.Nothing [val] declared in .test' type=kotlin.Nothing origin=null WHEN type=kotlin.Any origin=ELVIS BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val : T of .test [val] declared in .test' type=T of .test origin=null + arg0: GET_VAR 'val tmp_10: T of .test [val] declared in .test' type=T of .test origin=null arg1: CONST Null type=kotlin.Nothing? value=null then: CONST Int type=kotlin.Int value=42 BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: GET_VAR 'val : T of .test [val] declared in .test' type=kotlin.Any origin=null + then: GET_VAR 'val tmp_10: T of .test [val] declared in .test' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt index 0b94efef450..6c02abfbabc 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.txt @@ -30,7 +30,7 @@ FILE fqName: fileName:/lambdaInCAO.kt FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Function0): kotlin.Int declared in ' type=kotlin.Int origin=null $receiver: GET_VAR 'a: kotlin.Any declared in .test3' type=kotlin.Any origin=null index: FUN_EXPR type=kotlin.Function0 origin=LAMBDA @@ -44,5 +44,5 @@ FILE fqName: fileName:/lambdaInCAO.kt BLOCK_BODY GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test3' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt index a2eda65679c..f15ca2cba85 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.fir.txt @@ -48,14 +48,14 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt FUN name:testProperty visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit VALUE_PARAMETER name:nc index:0 type:test.C? BLOCK_BODY - VAR name: type:kotlin.Int? [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val] CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int? origin=null ERROR_CALL 'Unresolved reference: R|test/p|' type=IrErrorType - GET_VAR 'val : kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null + GET_VAR 'val tmp_0: kotlin.Int? [val] declared in test.testProperty' type=kotlin.Int? origin=null FUN name:testArrayAccess visibility:public modality:FINAL <> (nc:test.C?) returnType:kotlin.Unit VALUE_PARAMETER name:nc index:0 type:test.C? BLOCK_BODY - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] CALL 'public final fun get (index: kotlin.Int): kotlin.Int declared in test' type=kotlin.Int origin=null $receiver: CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int? origin=null index: CONST Int type=kotlin.Int value=0 @@ -63,5 +63,5 @@ FILE fqName:test fileName:/safeCallWithIncrementDecrement.kt $receiver: CALL 'public final fun (): kotlin.Int declared in test' type=kotlin.Int? origin=null index: CONST Int type=kotlin.Int value=0 value: CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null + GET_VAR 'val tmp_1: kotlin.Int [val] declared in test.testArrayAccess' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt index c9c2bf826ba..61bdd863b4b 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.fir.txt @@ -48,11 +48,11 @@ FILE fqName: fileName:/smartCastsWithDestructuring.kt GET_VAR 'x: .I1 declared in .test' type=.I1 origin=null then: RETURN type=kotlin.Nothing from='public final fun test (x: .I1): kotlin.Unit declared in ' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - VAR name: type:.I2 [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:.I2 [val] GET_VAR 'x: .I1 declared in .test' type=.I2 origin=null VAR name:c1 type:kotlin.Int [val] CALL 'public final fun component1 (): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: GET_VAR 'val : .I2 [val] declared in .test' type=.I2 origin=null + $receiver: GET_VAR 'val tmp_0: .I2 [val] declared in .test' type=.I2 origin=null VAR name:c2 type:kotlin.String [val] CALL 'public final fun component2 (): kotlin.String declared in ' type=kotlin.String origin=null - $receiver: GET_VAR 'val : .I2 [val] declared in .test' type=.I2 origin=null + $receiver: GET_VAR 'val tmp_0: .I2 [val] declared in .test' type=.I2 origin=null diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt index 1940a72c661..09be8244b17 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.fir.txt @@ -13,23 +13,23 @@ FILE fqName: fileName:/whileDoWhile.kt arg0: GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=5 body: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] 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 [var] declared in .test' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=10 body: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + GET_VAR 'val tmp_1: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK 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 @@ -37,23 +37,23 @@ FILE fqName: fileName:/whileDoWhile.kt arg1: CONST Int type=kotlin.Int value=0 DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + GET_VAR 'val tmp_2: kotlin.Int [val] 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 [var] declared in .test' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=15 DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .test' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in .test' type=kotlin.Int origin=null + GET_VAR 'val tmp_3: kotlin.Int [val] 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 [var] declared in .test' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=20 diff --git a/compiler/testData/ir/irText/lambdas/localFunction.fir.txt b/compiler/testData/ir/irText/lambdas/localFunction.fir.txt index 1290f7e86fd..2f27304902c 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.fir.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.fir.txt @@ -5,10 +5,10 @@ FILE fqName: fileName:/localFunction.kt CONST Int type=kotlin.Int value=0 FUN name:local visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var x: kotlin.Int [var] declared in .outer' type=kotlin.Int origin=null SET_VAR 'var x: kotlin.Int [var] declared in .outer' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .outer.local' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .outer.local' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .outer.local' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] declared in .outer.local' type=kotlin.Int origin=null CALL 'local final fun local (): kotlin.Unit declared in ' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt index f3d0683d9a6..7abf69d4138 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.fir.txt @@ -26,11 +26,11 @@ FILE fqName: fileName:/coercionInLoop.kt STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value="Fail " GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null - VAR name: type:kotlin.Int [val] + VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] GET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null SET_VAR 'var i: kotlin.Int [var] declared in .box' type=kotlin.Int origin=null CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'val : kotlin.Int [val] declared in .box' type=kotlin.Int origin=null - GET_VAR 'val : kotlin.Int [val] declared in .box' type=kotlin.Int origin=null + $this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in .box' type=kotlin.Int origin=null + GET_VAR 'val tmp_0: kotlin.Int [val] 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"