diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index 6df0085798a..7105e100f88 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -43,34 +43,34 @@ class RenderIrElementVisitor : IrElementVisitor { "FILE ${declaration.name}" override fun visitFunction(declaration: IrFunction, data: Nothing?): String = - "FUN ${declaration.renderDeclared()}" + "FUN ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitConstructor(declaration: IrConstructor, data: Nothing?): String = - "CONSTRUCTOR ${declaration.renderDeclared()}" + "CONSTRUCTOR ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitProperty(declaration: IrProperty, data: Nothing?): String = - "PROPERTY ${declaration.renderDeclared()}" + "PROPERTY ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitField(declaration: IrField, data: Nothing?): String = - "FIELD ${declaration.renderDeclared()}" + "FIELD ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitClass(declaration: IrClass, data: Nothing?): String = - "CLASS ${declaration.descriptor.kind} ${declaration.descriptor.ref()}" + "CLASS ${declaration.renderOrigin()}${declaration.descriptor.kind} ${declaration.descriptor.ref()}" override fun visitTypeAlias(declaration: IrTypeAlias, data: Nothing?): String = - "TYPEALIAS ${declaration.descriptor.ref()} type=${declaration.descriptor.underlyingType.render()}" + "TYPEALIAS ${declaration.renderOrigin()}${declaration.descriptor.ref()} type=${declaration.descriptor.underlyingType.render()}" override fun visitVariable(declaration: IrVariable, data: Nothing?): String = - "VAR ${declaration.renderDeclared()}" + "VAR ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitEnumEntry(declaration: IrEnumEntry, data: Nothing?): String = - "ENUM_ENTRY ${declaration.renderDeclared()}" + "ENUM_ENTRY ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: Nothing?): String = "ANONYMOUS_INITIALIZER ${declaration.descriptor.ref()}" override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?): String = - "LOCAL_DELEGATED_PROPERTY ${declaration.renderDeclared()}" + "LOCAL_DELEGATED_PROPERTY ${declaration.renderOrigin()}${declaration.renderDeclared()}" override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): String = "EXPRESSION_BODY" @@ -214,5 +214,8 @@ class RenderIrElementVisitor : IrElementVisitor { internal fun KotlinType.render(): String = DECLARATION_RENDERER.renderType(this) + + internal fun IrDeclaration.renderOrigin(): String = + if (origin != IrDeclarationOrigin.DEFINED) origin.toString() + " " else "" } } \ No newline at end of file diff --git a/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt b/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt index 53c528ea550..02400790379 100644 --- a/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt @@ -5,19 +5,19 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Base' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'Base' type=Base PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null @@ -26,9 +26,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt CONSTRUCTOR public constructor Test1(xx: kotlin.Int, yy: kotlin.Int) BLOCK_BODY BLOCK type=Base operator=ARGUMENTS_REORDERING_FOR_CALL - VAR val tmp0_y: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null - VAR val tmp1_x: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int GET_VAR 'value-parameter xx: Int' type=kotlin.Int operator=null DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)' x: GET_VAR 'tmp1_x: Int' type=kotlin.Int operator=null @@ -38,9 +38,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt CONSTRUCTOR public constructor Test2(xx: kotlin.Int, yy: kotlin.Int) BLOCK_BODY BLOCK type=Base operator=ARGUMENTS_REORDERING_FOR_CALL - VAR val tmp0_y: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_y: kotlin.Int GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null - VAR val tmp1_x: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_x: kotlin.Int GET_VAR 'value-parameter xx: Int' type=kotlin.Int operator=null DELEGATING_CONSTRUCTOR_CALL 'constructor Base(Int, Int)' x: GET_VAR 'tmp1_x: Int' type=kotlin.Int operator=null @@ -49,9 +49,9 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt CONSTRUCTOR public constructor Test2(xxx: kotlin.Int, yyy: kotlin.Int, a: kotlin.Any) BLOCK_BODY BLOCK type=Test2 operator=ARGUMENTS_REORDERING_FOR_CALL - VAR val tmp0_yy: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_yy: kotlin.Int GET_VAR 'value-parameter yyy: Int' type=kotlin.Int operator=null - VAR val tmp1_xx: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_xx: kotlin.Int GET_VAR 'value-parameter xxx: Int' type=kotlin.Int operator=null DELEGATING_CONSTRUCTOR_CALL 'constructor Test2(Int, Int)' xx: GET_VAR 'tmp1_xx: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/classMembers.txt b/compiler/testData/ir/irText/classes/classMembers.txt index add81c2cb89..0cf8481a1da 100644 --- a/compiler/testData/ir/irText/classes/classMembers.txt +++ b/compiler/testData/ir/irText/classes/classMembers.txt @@ -7,24 +7,24 @@ FILE /classMembers.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C PROPERTY public final var z: kotlin.Int - FIELD public final var z: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var z: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'z: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null receiver: THIS of 'C' type=C @@ -36,10 +36,10 @@ FILE /classMembers.kt y: CONST Int type=kotlin.Int value='0' z: CONST Int type=kotlin.Int value='0' PROPERTY public final val property: kotlin.Int = 0 - FIELD public final val property: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public final val property: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'property: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index 495586df13e..f9876c77025 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -16,7 +16,7 @@ FILE /classes.kt BLOCK_BODY ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super INSTANCE_INITIALIZER_CALL classDescriptor='TestEnumClass' - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): TestEnumClass + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnumClass SYNTHETIC_BODY kind=ENUM_VALUEOF diff --git a/compiler/testData/ir/irText/classes/dataClasses.txt b/compiler/testData/ir/irText/classes/dataClasses.txt index 09e73cab7d2..34ef703dcf1 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.txt @@ -5,55 +5,55 @@ FILE /dataClasses.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'Test1' type=Test1 PROPERTY public final val y: kotlin.String - FIELD public final val y: kotlin.String + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.String EXPRESSION_BODY GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'y: String' type=kotlin.String operator=null receiver: THIS of 'Test1' type=Test1 PROPERTY public final val z: kotlin.Any - FIELD public final val z: kotlin.Any + FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Any EXPRESSION_BODY GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Any + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' GET_BACKING_FIELD 'z: Any' type=kotlin.Any operator=null receiver: THIS of 'Test1' type=Test1 - FUN public final operator fun component1(): kotlin.Int + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component1(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='component1(): Int' CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY $this: THIS of 'Test1' type=Test1 - FUN public final operator fun component2(): kotlin.String + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component2(): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='component2(): String' CALL '(): String' type=kotlin.String operator=GET_PROPERTY $this: THIS of 'Test1' type=Test1 - FUN public final operator fun component3(): kotlin.Any + FUN GENERATED_DATA_CLASS_MEMBER public final operator fun component3(): kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='component3(): Any' CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY $this: THIS of 'Test1' type=Test1 - FUN public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1 + FUN GENERATED_DATA_CLASS_MEMBER public final fun copy(x: kotlin.Int = ..., y: kotlin.String = ..., z: kotlin.Any = ...): Test1 BLOCK_BODY RETURN type=kotlin.Nothing from='copy(Int = ..., String = ..., Any = ...): Test1' CALL 'constructor Test1(Int, String, Any)' type=Test1 operator=null x: GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int operator=null y: GET_VAR 'value-parameter y: String = ...' type=kotlin.String operator=null z: GET_VAR 'value-parameter z: Any = ...' type=kotlin.Any operator=null - FUN public open override fun toString(): kotlin.String + FUN GENERATED_DATA_CLASS_MEMBER public open override fun toString(): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String @@ -70,9 +70,9 @@ FILE /dataClasses.kt CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY $this: THIS of 'Test1' type=Test1 CONST String type=kotlin.String value=')' - FUN public open override fun hashCode(): kotlin.Int + FUN GENERATED_DATA_CLASS_MEMBER public open override fun hashCode(): kotlin.Int BLOCK_BODY - VAR val tmp0_result: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_result: kotlin.Int CONST Int type=kotlin.Int value='0' SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ CALL 'hashCode(): Int' type=kotlin.Int operator=null @@ -96,7 +96,7 @@ FILE /dataClasses.kt $this: THIS of 'Test1' type=Test1 RETURN type=kotlin.Nothing from='hashCode(): Int' GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null - FUN public open override fun equals(other: kotlin.Any?): kotlin.Boolean + FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean BLOCK_BODY WHEN type=kotlin.Unit operator=null if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQEQ @@ -109,7 +109,7 @@ FILE /dataClasses.kt GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' - VAR val tmp0_other_with_cast: Test1 + VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test1 TYPE_OP operator=CAST typeOperand=Test1 GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.txt index 37e0f94f98a..674d2a2d0aa 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.txt @@ -31,24 +31,24 @@ FILE /delegatedImplementation.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='' PROPERTY public open override val x: kotlin.String - FIELD public open override val x: kotlin.String + FIELD PROPERTY_BACKING_FIELD public open override val x: kotlin.String EXPRESSION_BODY GET_VAR 'value-parameter x0: String' type=kotlin.String operator=null - FUN public open override fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public open override fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'x: String' type=kotlin.String operator=null receiver: THIS of '' type=otherImpl. PROPERTY public open override var y: kotlin.Int - FIELD public open override var y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public open override var y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y0: Int' type=kotlin.Int operator=null - FUN public open override fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public open override fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null receiver: THIS of '' type=otherImpl. - FUN public open override fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public open override fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null receiver: THIS of '' type=otherImpl. @@ -71,21 +71,21 @@ FILE /delegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test1' - FIELD val `Test1$IBase$delegate`: BaseImpl + FIELD DELEGATE val `Test1$IBase$delegate`: BaseImpl EXPRESSION_BODY GET_OBJECT 'BaseImpl' type=BaseImpl - FUN public open override fun bar(): kotlin.Int + FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='bar(): Int' CALL 'bar(): Int' type=kotlin.Int operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null - FUN public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit BLOCK_BODY CALL 'foo(Int, String): Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null s: GET_VAR 'value-parameter s: String' type=kotlin.String operator=null - FUN public open override fun kotlin.String.qux(): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit BLOCK_BODY CALL 'qux() on String: Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null @@ -95,63 +95,63 @@ FILE /delegatedImplementation.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test2' - FIELD val `Test2$IBase$delegate`: BaseImpl + FIELD DELEGATE val `Test2$IBase$delegate`: BaseImpl EXPRESSION_BODY GET_OBJECT 'BaseImpl' type=BaseImpl - FUN public open override fun bar(): kotlin.Int + FUN DELEGATED_MEMBER public open override fun bar(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='bar(): Int' CALL 'bar(): Int' type=kotlin.Int operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null - FUN public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit BLOCK_BODY CALL 'foo(Int, String): Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null s: GET_VAR 'value-parameter s: String' type=kotlin.String operator=null - FUN public open override fun kotlin.String.qux(): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun kotlin.String.qux(): kotlin.Unit BLOCK_BODY CALL 'qux() on String: Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test2$IBase$delegate`: BaseImpl' type=BaseImpl operator=null $receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String - FIELD val `Test2$IOther$delegate`: IOther + FIELD DELEGATE val `Test2$IOther$delegate`: IOther EXPRESSION_BODY CALL 'otherImpl(String, Int): IOther' type=IOther operator=null x0: CONST String type=kotlin.String value='' y0: CONST Int type=kotlin.Int value='42' - PROPERTY public open override val kotlin.Byte.z1: kotlin.Int - FUN public open override fun kotlin.Byte.(): kotlin.Int + PROPERTY DELEGATED_MEMBER public open override val kotlin.Byte.z1: kotlin.Int + FUN DELEGATED_MEMBER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on Byte: Int' CALL '() on Byte: Int' type=kotlin.Int operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $receiver: $RECEIVER of 'z1: Int on Byte' type=kotlin.Byte - PROPERTY public open override val x: kotlin.String - FUN public open override fun (): kotlin.String + PROPERTY DELEGATED_MEMBER public open override val x: kotlin.String + FUN DELEGATED_MEMBER public open override fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' CALL '(): String' type=kotlin.String operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null - PROPERTY public open override var kotlin.Byte.z2: kotlin.Int - FUN public open override fun kotlin.Byte.(): kotlin.Int + PROPERTY DELEGATED_MEMBER public open override var kotlin.Byte.z2: kotlin.Int + FUN DELEGATED_MEMBER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on Byte: Int' CALL '() on Byte: Int' type=kotlin.Int operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte - FUN public open override fun kotlin.Byte.(: kotlin.Int): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun kotlin.Byte.(: kotlin.Int): kotlin.Unit BLOCK_BODY CALL '(Int) on Byte: Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null $receiver: $RECEIVER of 'z2: Int on Byte' type=kotlin.Byte : GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null - PROPERTY public open override var y: kotlin.Int - FUN public open override fun (): kotlin.Int + PROPERTY DELEGATED_MEMBER public open override var y: kotlin.Int + FUN DELEGATED_MEMBER public open override fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL '(): Int' type=kotlin.Int operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null - FUN public open override fun (: kotlin.Int): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun (: kotlin.Int): kotlin.Unit BLOCK_BODY CALL '(Int): Unit' type=kotlin.Unit operator=null $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt index 191f70a9a71..8b21367890a 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt @@ -16,10 +16,10 @@ FILE /delegatedImplementationWithExplicitOverride.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' - FIELD val `C$IFooBar$delegate`: FooBarImpl + FIELD DELEGATE val `C$IFooBar$delegate`: FooBarImpl EXPRESSION_BODY GET_OBJECT 'FooBarImpl' type=FooBarImpl - FUN public open override fun foo(): kotlin.Unit + FUN DELEGATED_MEMBER public open override fun foo(): kotlin.Unit BLOCK_BODY CALL 'foo(): Unit' type=kotlin.Unit operator=null $this: GET_VAR '`C$IFooBar$delegate`: FooBarImpl' type=FooBarImpl operator=null diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index d3410e1b7b2..caa2900f23b 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -8,9 +8,9 @@ FILE /enum.kt init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' TEST1 ENUM_ENTRY enum entry TEST2 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' TEST2 - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): TestEnum1 + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum1 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum2 CONSTRUCTOR private constructor TestEnum2(x: kotlin.Int) @@ -18,10 +18,10 @@ FILE /enum.kt ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -35,9 +35,9 @@ FILE /enum.kt ENUM_ENTRY enum entry TEST3 init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST3 x: CONST Int type=kotlin.Int value='3' - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): TestEnum2 + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum2 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum3 CONSTRUCTOR private constructor TestEnum3() @@ -56,9 +56,9 @@ FILE /enum.kt CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='Hello, world!' FUN public abstract fun foo(): kotlin.Unit - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): TestEnum3 + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum3 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum4 CONSTRUCTOR private constructor TestEnum4(x: kotlin.Int) @@ -66,10 +66,10 @@ FILE /enum.kt ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -95,8 +95,8 @@ FILE /enum.kt x: CONST Int type=kotlin.Int value='2' INSTANCE_INITIALIZER_CALL classDescriptor='TEST2' PROPERTY public final val z: kotlin.Int - FIELD public final val z: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val z: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'z: Int' type=kotlin.Int operator=null @@ -112,7 +112,7 @@ FILE /enum.kt CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: GET_ENUM_VALUE 'TEST2' type=TestEnum4 FUN public abstract fun foo(): kotlin.Unit - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): TestEnum4 + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): TestEnum4 SYNTHETIC_BODY kind=ENUM_VALUEOF diff --git a/compiler/testData/ir/irText/classes/initBlock.txt b/compiler/testData/ir/irText/classes/initBlock.txt index 4a683c79f66..93852efd50d 100644 --- a/compiler/testData/ir/irText/classes/initBlock.txt +++ b/compiler/testData/ir/irText/classes/initBlock.txt @@ -13,10 +13,10 @@ FILE /initBlock.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/initVal.txt b/compiler/testData/ir/irText/classes/initVal.txt index b0bca8f8021..4875a48addc 100644 --- a/compiler/testData/ir/irText/classes/initVal.txt +++ b/compiler/testData/ir/irText/classes/initVal.txt @@ -5,10 +5,10 @@ FILE /initVal.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValFromParameter' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -19,10 +19,10 @@ FILE /initVal.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInClass' PROPERTY public final val x: kotlin.Int = 0 - FIELD public final val x: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -33,8 +33,8 @@ FILE /initVal.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInInitBlock' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/initVar.txt b/compiler/testData/ir/irText/classes/initVar.txt index c03ee6aa8fc..edecebd0fb3 100644 --- a/compiler/testData/ir/irText/classes/initVar.txt +++ b/compiler/testData/ir/irText/classes/initVar.txt @@ -5,15 +5,15 @@ FILE /initVar.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarFromParameter' PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter @@ -24,15 +24,15 @@ FILE /initVar.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInClass' PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null receiver: THIS of 'TestInitVarInClass' type=TestInitVarInClass @@ -43,13 +43,13 @@ FILE /initVar.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInInitBlock' PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null receiver: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock @@ -65,10 +65,10 @@ FILE /initVar.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetter' PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -79,8 +79,8 @@ FILE /initVar.kt value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -100,8 +100,8 @@ FILE /initVar.kt INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterWithExplicitCtor' CLASS CLASS TestInitVarWithCustomSetterInCtor PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt index 29dc9345edd..e7a416a5976 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt @@ -2,7 +2,7 @@ FILE /objectLiteralExpressions.kt CLASS INTERFACE IFoo FUN public abstract fun foo(): kotlin.Unit PROPERTY public val test1: kotlin.Any - FIELD public val test1: kotlin.Any + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Any EXPRESSION_BODY BLOCK type=test1. operator=OBJECT_LITERAL CLASS CLASS @@ -11,12 +11,12 @@ FILE /objectLiteralExpressions.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='' CALL 'constructor ()' type=test1. operator=OBJECT_LITERAL - FUN public fun (): kotlin.Any + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' GET_BACKING_FIELD 'test1: Any' type=kotlin.Any operator=null PROPERTY public val test2: IFoo - FIELD public val test2: IFoo + FIELD PROPERTY_BACKING_FIELD public val test2: IFoo EXPRESSION_BODY BLOCK type=test2. operator=OBJECT_LITERAL CLASS CLASS @@ -29,7 +29,7 @@ FILE /objectLiteralExpressions.kt CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='foo' CALL 'constructor ()' type=test2. operator=OBJECT_LITERAL - FUN public fun (): IFoo + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): IFoo BLOCK_BODY RETURN type=kotlin.Nothing from='(): IFoo' GET_BACKING_FIELD 'test2: IFoo' type=IFoo operator=null diff --git a/compiler/testData/ir/irText/classes/objectWithInitializers.txt b/compiler/testData/ir/irText/classes/objectWithInitializers.txt index e48c7a68e00..cdd56089495 100644 --- a/compiler/testData/ir/irText/classes/objectWithInitializers.txt +++ b/compiler/testData/ir/irText/classes/objectWithInitializers.txt @@ -10,17 +10,17 @@ FILE /objectWithInitializers.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' INSTANCE_INITIALIZER_CALL classDescriptor='Test' PROPERTY public final val x: kotlin.Int = 1 - FIELD public final val x: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'Test' type=Test PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/primaryConstructor.txt b/compiler/testData/ir/irText/classes/primaryConstructor.txt index e097698d236..4d30ba12f22 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructor.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructor.txt @@ -5,19 +5,19 @@ FILE /primaryConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'Test1' type=Test1 PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null @@ -28,19 +28,19 @@ FILE /primaryConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null receiver: THIS of 'Test2' type=Test2 PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -51,17 +51,17 @@ FILE /primaryConstructor.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test3' PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null receiver: THIS of 'Test3' type=Test3 PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt b/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt index 8f12ff5e238..7585758066e 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt @@ -20,19 +20,19 @@ FILE /primaryConstructorWithSuperConstructorCall.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' INSTANCE_INITIALIZER_CALL classDescriptor='TestWithDelegatingConstructor' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor PROPERTY public final val y: kotlin.Int - FIELD public final val y: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val y: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'y: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/sealedClasses.txt b/compiler/testData/ir/irText/classes/sealedClasses.txt index 32ec20f8ded..8e9b90752a9 100644 --- a/compiler/testData/ir/irText/classes/sealedClasses.txt +++ b/compiler/testData/ir/irText/classes/sealedClasses.txt @@ -10,10 +10,10 @@ FILE /sealedClasses.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' INSTANCE_INITIALIZER_CALL classDescriptor='Const' PROPERTY public final val number: kotlin.Double - FIELD public final val number: kotlin.Double + FIELD PROPERTY_BACKING_FIELD public final val number: kotlin.Double EXPRESSION_BODY GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Double + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='(): Double' GET_BACKING_FIELD 'number: Double' type=kotlin.Double operator=null @@ -24,19 +24,19 @@ FILE /sealedClasses.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' INSTANCE_INITIALIZER_CALL classDescriptor='Sum' PROPERTY public final val e1: Expr - FIELD public final val e1: Expr + FIELD PROPERTY_BACKING_FIELD public final val e1: Expr EXPRESSION_BODY GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): Expr + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): Expr BLOCK_BODY RETURN type=kotlin.Nothing from='(): Expr' GET_BACKING_FIELD 'e1: Expr' type=Expr operator=null receiver: THIS of 'Sum' type=Expr.Sum PROPERTY public final val e2: Expr - FIELD public final val e2: Expr + FIELD PROPERTY_BACKING_FIELD public final val e2: Expr EXPRESSION_BODY GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): Expr + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): Expr BLOCK_BODY RETURN type=kotlin.Nothing from='(): Expr' GET_BACKING_FIELD 'e2: Expr' type=Expr operator=null diff --git a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt index 31d3b91d00a..1e8bb5a762b 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt @@ -6,10 +6,10 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt INSTANCE_INITIALIZER_CALL classDescriptor='Base' CLASS CLASS TestProperty PROPERTY public final val x: kotlin.Int = 0 - FIELD public final val x: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null @@ -20,8 +20,8 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt INSTANCE_INITIALIZER_CALL classDescriptor='TestProperty' CLASS CLASS TestInitBlock PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int - FUN public final fun (): kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/superCalls.txt b/compiler/testData/ir/irText/classes/superCalls.txt index be5cd93621d..f47ba03c018 100644 --- a/compiler/testData/ir/irText/classes/superCalls.txt +++ b/compiler/testData/ir/irText/classes/superCalls.txt @@ -7,10 +7,10 @@ FILE /superCalls.kt FUN public open fun foo(): kotlin.Unit BLOCK_BODY PROPERTY public open val bar: kotlin.String = "" - FIELD public open val bar: kotlin.String = "" + FIELD PROPERTY_BACKING_FIELD public open val bar: kotlin.String = "" EXPRESSION_BODY CONST String type=kotlin.String value='' - FUN public open fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public open fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'bar: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/declarations/classLevelProperties.txt b/compiler/testData/ir/irText/declarations/classLevelProperties.txt index e2a61086a72..6ae3eece39d 100644 --- a/compiler/testData/ir/irText/declarations/classLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/classLevelProperties.txt @@ -5,10 +5,10 @@ FILE /classLevelProperties.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val test1: kotlin.Int = 0 - FIELD public final val test1: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public final val test1: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null @@ -19,24 +19,24 @@ FILE /classLevelProperties.kt RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='0' PROPERTY public final var test3: kotlin.Int - FIELD public final var test3: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var test3: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test3: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit operator=null receiver: THIS of 'C' type=C value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null PROPERTY public final var test4: kotlin.Int - FIELD public final var test4: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var test4: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test4: Int' type=kotlin.Int operator=null @@ -46,10 +46,10 @@ FILE /classLevelProperties.kt SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit operator=EQ value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null PROPERTY public final var test5: kotlin.Int - FIELD public final var test5: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var test5: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test5: Int' type=kotlin.Int operator=null @@ -60,7 +60,7 @@ FILE /classLevelProperties.kt receiver: THIS of 'C' type=C value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null PROPERTY public final val test6: kotlin.Int = 1 - FIELD public final val test6: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public final val test6: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' FUN public final fun (): kotlin.Int @@ -69,16 +69,16 @@ FILE /classLevelProperties.kt GET_BACKING_FIELD 'test6: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C PROPERTY public final val test7: kotlin.Int - FIELD val `test7$delegate`: kotlin.Lazy + FIELD DELEGATE val `test7$delegate`: kotlin.Lazy EXPRESSION_BODY CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN public final fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null @@ -87,10 +87,10 @@ FILE /classLevelProperties.kt thisRef: THIS of 'C' type=C property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY public final var test8: kotlin.Int - FIELD val `test8$delegate`: java.util.HashMap + FIELD DELEGATE val `test8$delegate`: java.util.HashMap EXPRESSION_BODY CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null - FUN public final fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int operator=null @@ -98,7 +98,7 @@ FILE /classLevelProperties.kt receiver: THIS of 'C' type=C thisRef: THIS of 'C' type=C property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index 993596f3439..93fbcf32971 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -1,15 +1,15 @@ FILE /delegatedProperties.kt PROPERTY public val test1: kotlin.Int - FIELD val `test1$delegate`: kotlin.Lazy + FIELD DELEGATE val `test1$delegate`: kotlin.Lazy EXPRESSION_BODY CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN public fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null @@ -22,25 +22,25 @@ FILE /delegatedProperties.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val map: kotlin.collections.MutableMap - FIELD public final val map: kotlin.collections.MutableMap + FIELD PROPERTY_BACKING_FIELD public final val map: kotlin.collections.MutableMap EXPRESSION_BODY GET_VAR 'value-parameter map: MutableMap' type=kotlin.collections.MutableMap operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.collections.MutableMap + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.collections.MutableMap BLOCK_BODY RETURN type=kotlin.Nothing from='(): MutableMap' GET_BACKING_FIELD 'map: MutableMap' type=kotlin.collections.MutableMap operator=null receiver: THIS of 'C' type=C PROPERTY public final val test2: kotlin.Int - FIELD val `test2$delegate`: kotlin.Lazy + FIELD DELEGATE val `test2$delegate`: kotlin.Lazy EXPRESSION_BODY CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN public final fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null @@ -49,11 +49,11 @@ FILE /delegatedProperties.kt thisRef: THIS of 'C' type=C property: CALLABLE_REFERENCE 'test2: Int' type=kotlin.reflect.KProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY public final var test3: kotlin.Any - FIELD val `test3$delegate`: kotlin.collections.MutableMap + FIELD DELEGATE val `test3$delegate`: kotlin.collections.MutableMap EXPRESSION_BODY CALL '(): MutableMap' type=kotlin.collections.MutableMap operator=GET_PROPERTY $this: THIS of 'C' type=C - FUN public final fun (): kotlin.Any + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (): kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' CALL 'getValue(Any?, KProperty<*>) on MutableMap: Any' type=kotlin.Any operator=null @@ -61,7 +61,7 @@ FILE /delegatedProperties.kt receiver: THIS of 'C' type=C thisRef: THIS of 'C' type=C property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE - FUN public final fun (: kotlin.Any): kotlin.Unit + FUN DELEGATED_PROPERTY_ACCESSOR public final fun (: kotlin.Any): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(Any): Unit' CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit operator=null @@ -71,17 +71,17 @@ FILE /delegatedProperties.kt property: CALLABLE_REFERENCE 'test3: Any' type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter : Any' type=kotlin.Any operator=null PROPERTY public var test4: kotlin.Any - FIELD val `test4$delegate`: java.util.HashMap + FIELD DELEGATE val `test4$delegate`: java.util.HashMap EXPRESSION_BODY CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null - FUN public fun (): kotlin.Any + FUN DELEGATED_PROPERTY_ACCESSOR public fun (): kotlin.Any BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any' CALL 'getValue(Any?, KProperty<*>) on MutableMap: Any' type=kotlin.Any operator=null $receiver: GET_BACKING_FIELD '`test4$delegate`: HashMap' type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - FUN public fun (: kotlin.Any): kotlin.Unit + FUN DELEGATED_PROPERTY_ACCESSOR public fun (: kotlin.Any): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(Any): Unit' CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt index e05156e49d8..12bcb753da0 100644 --- a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt @@ -4,10 +4,10 @@ FILE /fileWithAnnotations.kt FUN public fun foo(): kotlin.Unit BLOCK_BODY PROPERTY public val bar: kotlin.Int = 42 - FIELD public val bar: kotlin.Int = 42 + FIELD PROPERTY_BACKING_FIELD public val bar: kotlin.Int = 42 EXPRESSION_BODY CONST Int type=kotlin.Int value='42' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index 3553ef38d74..17a6a9ea13d 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -2,15 +2,15 @@ FILE /localDelegatedProperties.kt FUN public fun test1(): kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY val x: kotlin.Int - VAR val `x$delegate`: kotlin.Lazy + VAR DELEGATE val `x$delegate`: kotlin.Lazy CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null @@ -22,16 +22,16 @@ FILE /localDelegatedProperties.kt FUN public fun test2(): kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY var x: kotlin.Int - VAR val `x$delegate`: java.util.HashMap + VAR DELEGATE val `x$delegate`: java.util.HashMap CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null - FUN local final fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int operator=null $receiver: GET_VAR '`x$delegate`: HashMap' type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - FUN local final fun (value: kotlin.Int): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR local final fun (value: kotlin.Int): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Int' TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int @@ -43,7 +43,7 @@ FILE /localDelegatedProperties.kt CALL '(Int): Int' type=kotlin.Int operator=EQ value: CONST Int type=kotlin.Int value='0' BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '(Int): Int' type=kotlin.Int operator=POSTFIX_INCR value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR diff --git a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt index c03ec85dbe8..984fd0b5043 100644 --- a/compiler/testData/ir/irText/declarations/packageLevelProperties.txt +++ b/compiler/testData/ir/irText/declarations/packageLevelProperties.txt @@ -1,9 +1,9 @@ FILE /packageLevelProperties.kt PROPERTY public val test1: kotlin.Int = 0 - FIELD public val test1: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null @@ -13,22 +13,22 @@ FILE /packageLevelProperties.kt RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='0' PROPERTY public var test3: kotlin.Int - FIELD public var test3: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var test3: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test3: Int' type=kotlin.Int operator=null - FUN public fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'test3: Int' type=kotlin.Unit operator=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null PROPERTY public var test4: kotlin.Int - FIELD public var test4: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var test4: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test4: Int' type=kotlin.Int operator=null @@ -37,10 +37,10 @@ FILE /packageLevelProperties.kt SET_BACKING_FIELD 'test4: Int' type=kotlin.Unit operator=EQ value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null PROPERTY public var test5: kotlin.Int - FIELD public var test5: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var test5: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test5: Int' type=kotlin.Int operator=null @@ -49,7 +49,7 @@ FILE /packageLevelProperties.kt SET_BACKING_FIELD 'test5: Int' type=kotlin.Unit operator=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null PROPERTY public val test6: kotlin.Int = 1 - FIELD public val test6: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' FUN public fun (): kotlin.Int @@ -57,16 +57,16 @@ FILE /packageLevelProperties.kt RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test6: Int' type=kotlin.Int operator=null PROPERTY public val test7: kotlin.Int - FIELD val `test7$delegate`: kotlin.Lazy + FIELD DELEGATE val `test7$delegate`: kotlin.Lazy EXPRESSION_BODY CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN public fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null @@ -74,17 +74,17 @@ FILE /packageLevelProperties.kt thisRef: CONST Null type=kotlin.Nothing? value='null' property: CALLABLE_REFERENCE 'test7: Int' type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE PROPERTY public var test8: kotlin.Int - FIELD val `test8$delegate`: java.util.HashMap + FIELD DELEGATE val `test8$delegate`: java.util.HashMap EXPRESSION_BODY CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null - FUN public fun (): kotlin.Int + FUN DELEGATED_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CALL 'getValue(Any?, KProperty<*>) on MutableMap: Int' type=kotlin.Int operator=null $receiver: GET_BACKING_FIELD '`test8$delegate`: HashMap' type=java.util.HashMap operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' property: CALLABLE_REFERENCE 'test8: Int' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - FUN public fun (: kotlin.Int): kotlin.Unit + FUN DELEGATED_PROPERTY_ACCESSOR public fun (: kotlin.Int): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt b/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt index 6f1fb5dc565..a194ce2f3d5 100644 --- a/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt +++ b/compiler/testData/ir/irText/declarations/primaryCtorDefaultArguments.txt @@ -7,10 +7,10 @@ FILE /primaryCtorDefaultArguments.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test' PROPERTY public final val x: kotlin.Int - FIELD public final val x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt b/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt index 6a35b502ebb..d31ee0b267b 100644 --- a/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt +++ b/compiler/testData/ir/irText/declarations/primaryCtorProperties.txt @@ -5,24 +5,24 @@ FILE /primaryCtorProperties.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val test1: kotlin.Int - FIELD public final val test1: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val test1: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter test1: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C PROPERTY public final var test2: kotlin.Int - FIELD public final var test2: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var test2: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter test2: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test2: Int' type=kotlin.Int operator=null receiver: THIS of 'C' type=C - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'test2: Int' type=kotlin.Unit operator=null receiver: THIS of 'C' type=C diff --git a/compiler/testData/ir/irText/errors/unresolvedReference.txt b/compiler/testData/ir/irText/errors/unresolvedReference.txt index 0c436ce954c..a232a3ff54f 100644 --- a/compiler/testData/ir/irText/errors/unresolvedReference.txt +++ b/compiler/testData/ir/irText/errors/unresolvedReference.txt @@ -1,35 +1,35 @@ FILE /unresolvedReference.kt PROPERTY public val test1: [ERROR : Type for unresolved] - FIELD public val test1: [ERROR : Type for unresolved] + FIELD PROPERTY_BACKING_FIELD public val test1: [ERROR : Type for unresolved] EXPRESSION_BODY ERROR_CALL '' type=[ERROR : ] - FUN public fun (): [ERROR : Type for unresolved] + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): [ERROR : Type for unresolved] BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for unresolved]' GET_BACKING_FIELD 'test1: [ERROR : Type for unresolved]' type=[ERROR : Type for unresolved] operator=null PROPERTY public val test2: [ERROR : Unresolved] - FIELD public val test2: [ERROR : Unresolved] + FIELD PROPERTY_BACKING_FIELD public val test2: [ERROR : Unresolved] EXPRESSION_BODY ERROR_CALL '' type=[ERROR : ] - FUN public fun (): [ERROR : Unresolved] + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): [ERROR : Unresolved] BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Unresolved]' GET_BACKING_FIELD 'test2: [ERROR : Unresolved]' type=[ERROR : Unresolved] operator=null PROPERTY public val test3: [ERROR : Type for 42.unresolved(56)] - FIELD public val test3: [ERROR : Type for 42.unresolved(56)] + FIELD PROPERTY_BACKING_FIELD public val test3: [ERROR : Type for 42.unresolved(56)] EXPRESSION_BODY ERROR_CALL '' type=[ERROR : ] receiver: CONST Int type=kotlin.Int value='42' CONST Int type=kotlin.Int value='56' - FUN public fun (): [ERROR : Type for 42.unresolved(56)] + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): [ERROR : Type for 42.unresolved(56)] BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for 42.unresolved(56)]' GET_BACKING_FIELD 'test3: [ERROR : Type for 42.unresolved(56)]' type=[ERROR : Type for 42.unresolved(56)] operator=null PROPERTY public val test4: [ERROR : Type for 42 *] - FIELD public val test4: [ERROR : Type for 42 *] + FIELD PROPERTY_BACKING_FIELD public val test4: [ERROR : Type for 42 *] EXPRESSION_BODY ERROR_EXPR '' type=[ERROR : ] - FUN public fun (): [ERROR : Type for 42 *] + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): [ERROR : Type for 42 *] BLOCK_BODY RETURN type=kotlin.Nothing from='(): [ERROR : Type for 42 *]' GET_BACKING_FIELD 'test4: [ERROR : Type for 42 *]' type=[ERROR : Type for 42 *] operator=null diff --git a/compiler/testData/ir/irText/expressions/arrayAccess.txt b/compiler/testData/ir/irText/expressions/arrayAccess.txt index 233b84a1074..82538aaf5d6 100644 --- a/compiler/testData/ir/irText/expressions/arrayAccess.txt +++ b/compiler/testData/ir/irText/expressions/arrayAccess.txt @@ -1,9 +1,9 @@ FILE /arrayAccess.kt PROPERTY public val p: kotlin.Int = 0 - FIELD public val p: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public val p: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt index f3c2b05823e..b1bae84053a 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt @@ -17,10 +17,10 @@ FILE /arrayAugmentedAssignment1.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val x: kotlin.IntArray - FIELD public final val x: kotlin.IntArray + FIELD PROPERTY_BACKING_FIELD public final val x: kotlin.IntArray EXPRESSION_BODY GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.IntArray + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.IntArray BLOCK_BODY RETURN type=kotlin.Nothing from='(): IntArray' GET_BACKING_FIELD 'x: IntArray' type=kotlin.IntArray operator=null @@ -30,9 +30,9 @@ FILE /arrayAugmentedAssignment1.kt VAR var x: kotlin.IntArray CALL 'foo(): IntArray' type=kotlin.IntArray operator=null BLOCK type=kotlin.Unit operator=PLUSEQ - VAR val tmp0_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray GET_VAR 'x: IntArray' type=kotlin.IntArray operator=null - VAR val tmp1_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=PLUSEQ $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null @@ -45,9 +45,9 @@ FILE /arrayAugmentedAssignment1.kt FUN public fun testCall(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=MULTEQ - VAR val tmp0_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray CALL 'foo(): IntArray' type=kotlin.IntArray operator=null - VAR val tmp1_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int CALL 'bar(): Int' type=kotlin.Int operator=null CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=MULTEQ $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null @@ -60,12 +60,12 @@ FILE /arrayAugmentedAssignment1.kt FUN public fun testMember(c: C): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY $this: GET_VAR 'value-parameter c: C' type=C operator=null - VAR val tmp1_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp2: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt index 9a198eac52f..a7bc65185d7 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt @@ -6,9 +6,9 @@ FILE /arrayAugmentedAssignment2.kt FUN public fun IB.test(a: IA): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ - VAR val tmp0_array: IA + VAR IR_TEMPORARY_VARIABLE val tmp0_array: IA GET_VAR 'value-parameter a: IA' type=IA operator=null - VAR val tmp1_index0: kotlin.String + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.String CONST String type=kotlin.String value='' CALL 'set(String, Int) on IA: Unit' type=kotlin.Unit operator=PLUSEQ $this: $RECEIVER of 'test(IA) on IB: Unit' type=IB diff --git a/compiler/testData/ir/irText/expressions/assignments.txt b/compiler/testData/ir/irText/expressions/assignments.txt index 90b12b57422..9d4d2ded46e 100644 --- a/compiler/testData/ir/irText/expressions/assignments.txt +++ b/compiler/testData/ir/irText/expressions/assignments.txt @@ -5,15 +5,15 @@ FILE /assignments.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Ref' PROPERTY public final var x: kotlin.Int - FIELD public final var x: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x: Int' type=kotlin.Int operator=null receiver: THIS of 'Ref' type=Ref - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null receiver: THIS of 'Ref' type=Ref diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt index a035f297e60..0a2bd96dd46 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt @@ -1,13 +1,13 @@ FILE /augmentedAssignment1.kt PROPERTY public var p: kotlin.Int - FIELD public var p: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var p: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null - FUN public fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'p: Int' type=kotlin.Unit operator=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt index 77c704a2462..e96bde29530 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt @@ -15,10 +15,10 @@ FILE /augmentedAssignment2.kt FUN public operator fun A.modAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY PROPERTY public val p: A - FIELD public val p: A + FIELD PROPERTY_BACKING_FIELD public val p: A EXPRESSION_BODY CALL 'constructor A()' type=A operator=null - FUN public fun (): A + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): A BLOCK_BODY RETURN type=kotlin.Nothing from='(): A' GET_BACKING_FIELD 'p: A' type=A operator=null diff --git a/compiler/testData/ir/irText/expressions/badBreakContinue.txt b/compiler/testData/ir/irText/expressions/badBreakContinue.txt index 2cca79ec9a1..40574f244cc 100644 --- a/compiler/testData/ir/irText/expressions/badBreakContinue.txt +++ b/compiler/testData/ir/irText/expressions/badBreakContinue.txt @@ -17,7 +17,7 @@ FILE /badBreakContinue.kt body: BLOCK type=kotlin.Unit operator=null VAR val lambda: () -> kotlin.Nothing BLOCK type=() -> kotlin.Nothing operator=LAMBDA - FUN local final fun (): kotlin.Nothing + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Nothing BLOCK_BODY ERROR_EXPR 'Loop not found for break expression: break@L1' type=kotlin.Nothing ERROR_EXPR 'Loop not found for continue expression: continue@L1' type=kotlin.Nothing diff --git a/compiler/testData/ir/irText/expressions/bangbang.txt b/compiler/testData/ir/irText/expressions/bangbang.txt index ec3c5e7fd74..5be63385211 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.txt @@ -3,7 +3,7 @@ FILE /bangbang.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test1(Any?): Any' BLOCK type=kotlin.Any operator=EXCLEXCL - VAR val tmp0_notnull: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_notnull: kotlin.Any? GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -15,9 +15,9 @@ FILE /bangbang.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test2(Any?): Int' BLOCK type=kotlin.Int operator=EXCLEXCL - VAR val tmp1_notnull: kotlin.Int? + VAR IR_TEMPORARY_VARIABLE val tmp1_notnull: kotlin.Int? BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Any? GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/boundCallableReferences.txt b/compiler/testData/ir/irText/expressions/boundCallableReferences.txt index 46563092c85..46ebea42889 100644 --- a/compiler/testData/ir/irText/expressions/boundCallableReferences.txt +++ b/compiler/testData/ir/irText/expressions/boundCallableReferences.txt @@ -7,10 +7,10 @@ FILE /boundCallableReferences.kt FUN public final fun foo(): kotlin.Unit BLOCK_BODY PROPERTY public final val bar: kotlin.Int = 0 - FIELD public final val bar: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public final val bar: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'bar: Int' type=kotlin.Int operator=null @@ -18,29 +18,29 @@ FILE /boundCallableReferences.kt FUN public fun A.qux(): kotlin.Unit BLOCK_BODY PROPERTY public val test1: kotlin.reflect.KFunction0 - FIELD public val test1: kotlin.reflect.KFunction0 + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KFunction0 EXPRESSION_BODY CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0 operator=null $this: CALL 'constructor A()' type=A operator=null - FUN public fun (): kotlin.reflect.KFunction0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction0' GET_BACKING_FIELD 'test1: KFunction0' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test2: kotlin.reflect.KProperty0 - FIELD public val test2: kotlin.reflect.KProperty0 + FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.reflect.KProperty0 EXPRESSION_BODY CALLABLE_REFERENCE 'bar: Int' type=kotlin.reflect.KProperty0 operator=null $this: CALL 'constructor A()' type=A operator=null - FUN public fun (): kotlin.reflect.KProperty0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KProperty0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KProperty0' GET_BACKING_FIELD 'test2: KProperty0' type=kotlin.reflect.KProperty0 operator=null PROPERTY public val test3: kotlin.reflect.KFunction0 - FIELD public val test3: kotlin.reflect.KFunction0 + FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.reflect.KFunction0 EXPRESSION_BODY CALLABLE_REFERENCE 'qux() on A: Unit' type=kotlin.reflect.KFunction0 operator=null $receiver: CALL 'constructor A()' type=A operator=null - FUN public fun (): kotlin.reflect.KFunction0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction0' GET_BACKING_FIELD 'test3: KFunction0' type=kotlin.reflect.KFunction0 operator=null diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt index bf2feb2c5da..533b38f82e3 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt @@ -6,7 +6,7 @@ FILE /breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit operator=null WHILE label=null operator=WHILE_LOOP condition: BLOCK type=kotlin.Boolean operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Boolean? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean? GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null WHEN type=kotlin.Boolean operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -21,7 +21,7 @@ FILE /breakContinueInLoopHeader.kt body: BLOCK type=kotlin.Unit operator=null WHILE label=null operator=WHILE_LOOP condition: BLOCK type=kotlin.Boolean operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Boolean? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean? GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null WHEN type=kotlin.Boolean operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -35,10 +35,10 @@ FILE /breakContinueInLoopHeader.kt condition: CONST Boolean type=kotlin.Boolean value='true' body: BLOCK type=kotlin.Unit operator=null BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp1_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: BLOCK type=kotlin.collections.List operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.collections.List? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List? GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? operator=null WHEN type=kotlin.collections.List operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -59,10 +59,10 @@ FILE /breakContinueInLoopHeader.kt condition: CONST Boolean type=kotlin.Boolean value='true' body: BLOCK type=kotlin.Unit operator=null BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp1_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: BLOCK type=kotlin.collections.List operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.collections.List? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List? GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? operator=null WHEN type=kotlin.collections.List operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt index 6f8980810d9..2ac23823706 100644 --- a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt +++ b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt @@ -23,17 +23,17 @@ FILE /callWithReorderedArguments.kt a: CALL 'noReorder1(): Int' type=kotlin.Int operator=null b: CALL 'noReorder2(): Int' type=kotlin.Int operator=null BLOCK type=kotlin.Unit operator=ARGUMENTS_REORDERING_FOR_CALL - VAR val tmp0_b: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_b: kotlin.Int CALL 'reordered1(): Int' type=kotlin.Int operator=null - VAR val tmp1_a: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_a: kotlin.Int CALL 'reordered2(): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null a: GET_VAR 'tmp1_a: Int' type=kotlin.Int operator=null b: GET_VAR 'tmp0_b: Int' type=kotlin.Int operator=null BLOCK type=kotlin.Unit operator=ARGUMENTS_REORDERING_FOR_CALL - VAR val tmp2_b: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2_b: kotlin.Int CONST Int type=kotlin.Int value='1' - VAR val tmp3_a: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp3_a: kotlin.Int CALL 'reordered2(): Int' type=kotlin.Int operator=null CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null a: GET_VAR 'tmp3_a: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt index e9a8c61156f..3cb9f1fdecd 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt @@ -16,13 +16,13 @@ FILE /chainOfSafeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test(C?): C?' BLOCK type=C? operator=SAFE_CALL - VAR val tmp3_safe_receiver: C? + VAR IR_TEMPORARY_VARIABLE val tmp3_safe_receiver: C? BLOCK type=C? operator=SAFE_CALL - VAR val tmp2_safe_receiver: C? + VAR IR_TEMPORARY_VARIABLE val tmp2_safe_receiver: C? BLOCK type=C? operator=SAFE_CALL - VAR val tmp1_safe_receiver: C? + VAR IR_TEMPORARY_VARIABLE val tmp1_safe_receiver: C? BLOCK type=C? operator=SAFE_CALL - VAR val tmp0_safe_receiver: C? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: C? GET_VAR 'value-parameter nc: C?' type=C? operator=null WHEN type=C? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt index 9ec40b92323..132cd2be0d6 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt @@ -5,15 +5,15 @@ FILE /complexAugmentedAssignment.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='X1' PROPERTY public final var x1: kotlin.Int - FIELD public final var x1: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x1: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x1: Int' type=kotlin.Int operator=null receiver: THIS of 'X1' type=X1 - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x1: Int' type=kotlin.Unit operator=null receiver: THIS of 'X1' type=X1 @@ -24,15 +24,15 @@ FILE /complexAugmentedAssignment.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='X2' PROPERTY public final var x2: kotlin.Int - FIELD public final var x2: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x2: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x2: Int' type=kotlin.Int operator=null receiver: THIS of 'X2' type=X1.X2 - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x2: Int' type=kotlin.Unit operator=null receiver: THIS of 'X2' type=X1.X2 @@ -43,15 +43,15 @@ FILE /complexAugmentedAssignment.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='X3' PROPERTY public final var x3: kotlin.Int - FIELD public final var x3: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var x3: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'x3: Int' type=kotlin.Int operator=null receiver: THIS of 'X3' type=X1.X2.X3 - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'x3: Int' type=kotlin.Unit operator=null receiver: THIS of 'X3' type=X1.X2.X3 @@ -61,17 +61,17 @@ FILE /complexAugmentedAssignment.kt VAR var i: kotlin.Int CONST Int type=kotlin.Int value='0' BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp1_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp1_array: kotlin.IntArray GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null - VAR val tmp2_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2_index0: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'i: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'i: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null GET_VAR 'tmp0: Int' type=kotlin.Int operator=null - VAR val tmp3: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp1_array: IntArray' type=kotlin.IntArray operator=null index: GET_VAR 'tmp2_index0: Int' type=kotlin.Int operator=null @@ -84,10 +84,10 @@ FILE /complexAugmentedAssignment.kt FUN public fun test2(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0_this: X1 + VAR IR_TEMPORARY_VARIABLE val tmp0_this: X1 GET_OBJECT 'X1' type=X1 BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp0_this: X1' type=X1 operator=null CALL '(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR @@ -96,10 +96,10 @@ FILE /complexAugmentedAssignment.kt $this: GET_VAR 'tmp1: Int' type=kotlin.Int operator=null GET_VAR 'tmp1: Int' type=kotlin.Int operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp2_this: X1.X2 + VAR IR_TEMPORARY_VARIABLE val tmp2_this: X1.X2 GET_OBJECT 'X2' type=X1.X2 BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp3: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 operator=null CALL '(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR @@ -108,10 +108,10 @@ FILE /complexAugmentedAssignment.kt $this: GET_VAR 'tmp3: Int' type=kotlin.Int operator=null GET_VAR 'tmp3: Int' type=kotlin.Int operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp4_this: X1.X2.X3 + VAR IR_TEMPORARY_VARIABLE val tmp4_this: X1.X2.X3 GET_OBJECT 'X3' type=X1.X2.X3 BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp5: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 operator=null CALL '(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR @@ -127,15 +127,15 @@ FILE /complexAugmentedAssignment.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='B' PROPERTY public final var s: kotlin.Int - FIELD public final var s: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var s: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 's: Int' type=kotlin.Int operator=null receiver: THIS of 'B' type=B - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 's: Int' type=kotlin.Unit operator=null receiver: THIS of 'B' type=B @@ -148,7 +148,7 @@ FILE /complexAugmentedAssignment.kt FUN public final operator fun B.plusAssign(b: B): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ - VAR val tmp0_this: B + VAR IR_TEMPORARY_VARIABLE val tmp0_this: B $RECEIVER of 'plusAssign(B) on B: Unit' type=B CALL '(Int): Unit' type=kotlin.Unit operator=PLUSEQ $this: GET_VAR 'tmp0_this: B' type=B operator=null diff --git a/compiler/testData/ir/irText/expressions/destructuring1.txt b/compiler/testData/ir/irText/expressions/destructuring1.txt index d2c64f536c2..c6219675916 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.txt @@ -20,7 +20,7 @@ FILE /destructuring1.kt FUN public fun B.test(): kotlin.Unit BLOCK_BODY COMPOSITE type=kotlin.Unit operator=DESTRUCTURING_DECLARATION - VAR val tmp0_container: A + VAR IR_TEMPORARY_VARIABLE val tmp0_container: A GET_OBJECT 'A' type=A VAR val x: kotlin.Int CALL 'component1() on A: Int' type=kotlin.Int operator=COMPONENT_N(index=1) diff --git a/compiler/testData/ir/irText/expressions/dotQualified.txt b/compiler/testData/ir/irText/expressions/dotQualified.txt index 8d5d15c46bd..439102db77b 100644 --- a/compiler/testData/ir/irText/expressions/dotQualified.txt +++ b/compiler/testData/ir/irText/expressions/dotQualified.txt @@ -8,7 +8,7 @@ FILE /dotQualified.kt BLOCK_BODY RETURN type=kotlin.Nothing from='lengthN(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter s: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/elvis.txt b/compiler/testData/ir/irText/expressions/elvis.txt index b72e1296f58..28ef4353c15 100644 --- a/compiler/testData/ir/irText/expressions/elvis.txt +++ b/compiler/testData/ir/irText/expressions/elvis.txt @@ -1,9 +1,9 @@ FILE /elvis.kt PROPERTY public val p: kotlin.Any? = null - FIELD public val p: kotlin.Any? = null + FIELD PROPERTY_BACKING_FIELD public val p: kotlin.Any? = null EXPRESSION_BODY CONST Null type=kotlin.Nothing? value='null' - FUN public fun (): kotlin.Any? + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Any? BLOCK_BODY RETURN type=kotlin.Nothing from='(): Any?' GET_BACKING_FIELD 'p: Any?' type=kotlin.Any? operator=null @@ -15,7 +15,7 @@ FILE /elvis.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test1(Any?, Any): Any' BLOCK type=kotlin.Any operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any? GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -27,7 +27,7 @@ FILE /elvis.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test2(String?, Any): Any' BLOCK type=kotlin.Any operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.String? GET_VAR 'value-parameter a: String?' type=kotlin.String? operator=null WHEN type=kotlin.Any operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -49,7 +49,7 @@ FILE /elvis.kt CONST String type=kotlin.String value='' RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' BLOCK type=kotlin.String operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any? GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.String operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -63,7 +63,7 @@ FILE /elvis.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test4(Any): Any' BLOCK type=kotlin.Any operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any? CALL '(): Any?' type=kotlin.Any? operator=GET_PROPERTY WHEN type=kotlin.Any operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -75,7 +75,7 @@ FILE /elvis.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test5(Any): Any' BLOCK type=kotlin.Any operator=ELVIS - VAR val tmp0_elvis_lhs: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any? CALL 'foo(): Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/field.txt b/compiler/testData/ir/irText/expressions/field.txt index bc3bc7e842e..b9fb8fc3382 100644 --- a/compiler/testData/ir/irText/expressions/field.txt +++ b/compiler/testData/ir/irText/expressions/field.txt @@ -1,9 +1,9 @@ FILE /field.kt PROPERTY public var testSimple: kotlin.Int - FIELD public var testSimple: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var testSimple: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'testSimple: Int' type=kotlin.Int operator=null @@ -12,10 +12,10 @@ FILE /field.kt SET_BACKING_FIELD 'testSimple: Int' type=kotlin.Unit operator=EQ value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null PROPERTY public var testAugmented: kotlin.Int - FIELD public var testAugmented: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var testAugmented: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/for.txt b/compiler/testData/ir/irText/expressions/for.txt index dd4006da33f..60eb175fd8f 100644 --- a/compiler/testData/ir/irText/expressions/for.txt +++ b/compiler/testData/ir/irText/expressions/for.txt @@ -2,7 +2,7 @@ FILE /for.kt FUN public fun testEmpty(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE @@ -15,7 +15,7 @@ FILE /for.kt FUN public fun testIterable(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE @@ -31,14 +31,14 @@ FILE /for.kt FUN public fun testDestructuring(pp: kotlin.collections.List>): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator> + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator> CALL 'iterator(): Iterator>' type=kotlin.collections.Iterator> operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter pp: List>' type=kotlin.collections.List> operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT $this: GET_VAR 'tmp0_iterator: Iterator>' type=kotlin.collections.Iterator> operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE - VAR val tmp1_loop_parameter: kotlin.Pair + VAR IR_TEMPORARY_VARIABLE val tmp1_loop_parameter: kotlin.Pair CALL 'next(): Pair' type=kotlin.Pair operator=FOR_LOOP_NEXT $this: GET_VAR 'tmp0_iterator: Iterator>' type=kotlin.collections.Iterator> operator=null VAR val i: kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt index b49520be400..c3c9d3574c5 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt @@ -2,7 +2,7 @@ FILE /forWithBreakContinue.kt FUN public fun testForBreak1(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE @@ -17,7 +17,7 @@ FILE /forWithBreakContinue.kt FUN public fun testForBreak2(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE @@ -29,7 +29,7 @@ FILE /forWithBreakContinue.kt $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp1_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=INNER operator=FOR_LOOP_INNER_WHILE @@ -47,7 +47,7 @@ FILE /forWithBreakContinue.kt FUN public fun testForContinue1(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE @@ -62,7 +62,7 @@ FILE /forWithBreakContinue.kt FUN public fun testForContinue2(ss: kotlin.collections.List): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=OUTER operator=FOR_LOOP_INNER_WHILE @@ -74,7 +74,7 @@ FILE /forWithBreakContinue.kt $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp1_iterator: kotlin.collections.Iterator + VAR IR_TEMPORARY_VARIABLE val tmp1_iterator: kotlin.collections.Iterator CALL 'iterator(): Iterator' type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR $this: GET_VAR 'value-parameter ss: List' type=kotlin.collections.List operator=null WHILE label=INNER operator=FOR_LOOP_INNER_WHILE diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt index 76177bb041f..87185883471 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt @@ -10,15 +10,15 @@ FILE /forWithImplicitReceivers.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='IntCell' PROPERTY public final var value: kotlin.Int - FIELD public final var value: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var value: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'value: Int' type=kotlin.Int operator=null receiver: THIS of 'IntCell' type=IntCell - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=null receiver: THIS of 'IntCell' type=IntCell @@ -41,10 +41,10 @@ FILE /forWithImplicitReceivers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='next() on IntCell: Int' BLOCK type=kotlin.Int operator=POSTFIX_DECR - VAR val tmp0_this: IntCell + VAR IR_TEMPORARY_VARIABLE val tmp0_this: IntCell $RECEIVER of 'next() on IntCell: Int' type=IntCell BLOCK type=kotlin.Int operator=POSTFIX_DECR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_DECR $this: GET_VAR 'tmp0_this: IntCell' type=IntCell operator=null CALL '(Int): Unit' type=kotlin.Unit operator=POSTFIX_DECR @@ -55,7 +55,7 @@ FILE /forWithImplicitReceivers.kt FUN public fun IReceiver.test(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP - VAR val tmp0_iterator: IntCell + VAR IR_TEMPORARY_VARIABLE val tmp0_iterator: IntCell CALL 'iterator() on FiveTimes: IntCell' type=IntCell operator=FOR_LOOP_ITERATOR $this: $RECEIVER of 'test() on IReceiver: Unit' type=IReceiver $receiver: GET_OBJECT 'FiveTimes' type=FiveTimes diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.txt index 0f70362343e..9de250f5d0a 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.txt @@ -1,25 +1,25 @@ FILE /incrementDecrement.kt PROPERTY public var p: kotlin.Int - FIELD public var p: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var p: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'p: Int' type=kotlin.Int operator=null - FUN public fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'p: Int' type=kotlin.Unit operator=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null PROPERTY public val arr: kotlin.IntArray - FIELD public val arr: kotlin.IntArray + FIELD PROPERTY_BACKING_FIELD public val arr: kotlin.IntArray EXPRESSION_BODY CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null elements: VARARG type=IntArray varargElementType=Int CONST Int type=kotlin.Int value='1' CONST Int type=kotlin.Int value='2' CONST Int type=kotlin.Int value='3' - FUN public fun (): kotlin.IntArray + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.IntArray BLOCK_BODY RETURN type=kotlin.Nothing from='(): IntArray' GET_BACKING_FIELD 'arr: IntArray' type=kotlin.IntArray operator=null @@ -29,7 +29,7 @@ FILE /incrementDecrement.kt CONST Int type=kotlin.Int value='0' VAR val x1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int CALL 'inc(): Int' type=kotlin.Int operator=PREFIX_INCR $this: GET_VAR 'x: Int' type=kotlin.Int operator=PREFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=PREFIX_INCR @@ -37,7 +37,7 @@ FILE /incrementDecrement.kt GET_VAR 'tmp0: Int' type=kotlin.Int operator=null VAR val x2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int CALL 'dec(): Int' type=kotlin.Int operator=PREFIX_DECR $this: GET_VAR 'x: Int' type=kotlin.Int operator=PREFIX_DECR SET_VAR 'x: Int' type=kotlin.Unit operator=PREFIX_DECR @@ -49,7 +49,7 @@ FILE /incrementDecrement.kt CONST Int type=kotlin.Int value='0' VAR val x1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR @@ -57,7 +57,7 @@ FILE /incrementDecrement.kt GET_VAR 'tmp0: Int' type=kotlin.Int operator=null VAR val x2: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_DECR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_DECR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_DECR CALL 'dec(): Int' type=kotlin.Int operator=POSTFIX_DECR @@ -68,7 +68,7 @@ FILE /incrementDecrement.kt VAR val p1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR BLOCK type=kotlin.Int operator=PREFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int CALL 'inc(): Int' type=kotlin.Int operator=PREFIX_INCR $this: CALL '(): Int' type=kotlin.Int operator=PREFIX_INCR CALL '(Int): Unit' type=kotlin.Unit operator=PREFIX_INCR @@ -77,7 +77,7 @@ FILE /incrementDecrement.kt VAR val p2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR BLOCK type=kotlin.Int operator=PREFIX_DECR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int CALL 'dec(): Int' type=kotlin.Int operator=PREFIX_DECR $this: CALL '(): Int' type=kotlin.Int operator=PREFIX_DECR CALL '(Int): Unit' type=kotlin.Unit operator=PREFIX_DECR @@ -88,7 +88,7 @@ FILE /incrementDecrement.kt VAR val p1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int CALL '(): Int' type=kotlin.Int operator=POSTFIX_INCR CALL '(Int): Unit' type=kotlin.Unit operator=POSTFIX_INCR : CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR @@ -97,7 +97,7 @@ FILE /incrementDecrement.kt VAR val p2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR BLOCK type=kotlin.Int operator=PREFIX_DECR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int CALL 'dec(): Int' type=kotlin.Int operator=PREFIX_DECR $this: CALL '(): Int' type=kotlin.Int operator=PREFIX_DECR CALL '(Int): Unit' type=kotlin.Unit operator=PREFIX_DECR @@ -107,11 +107,11 @@ FILE /incrementDecrement.kt BLOCK_BODY VAR val a1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR - VAR val tmp0_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY - VAR val tmp1_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp2: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int CALL 'inc(): Int' type=kotlin.Int operator=PREFIX_INCR $this: CALL 'get(Int): Int' type=kotlin.Int operator=PREFIX_INCR $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null @@ -123,11 +123,11 @@ FILE /incrementDecrement.kt GET_VAR 'tmp2: Int' type=kotlin.Int operator=null VAR val a2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR - VAR val tmp3_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp3_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY - VAR val tmp4_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp4_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp5: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int CALL 'dec(): Int' type=kotlin.Int operator=PREFIX_DECR $this: CALL 'get(Int): Int' type=kotlin.Int operator=PREFIX_DECR $this: GET_VAR 'tmp3_array: IntArray' type=kotlin.IntArray operator=null @@ -141,11 +141,11 @@ FILE /incrementDecrement.kt BLOCK_BODY VAR val a1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY - VAR val tmp1_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp2: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null @@ -157,11 +157,11 @@ FILE /incrementDecrement.kt GET_VAR 'tmp2: Int' type=kotlin.Int operator=null VAR val a2: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_DECR - VAR val tmp3_array: kotlin.IntArray + VAR IR_TEMPORARY_VARIABLE val tmp3_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY - VAR val tmp4_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp4_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp5: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int CALL 'get(Int): Int' type=kotlin.Int operator=POSTFIX_DECR $this: GET_VAR 'tmp3_array: IntArray' type=kotlin.IntArray operator=null index: GET_VAR 'tmp4_index0: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt index 5746f170f2e..aed71bcf410 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt @@ -26,7 +26,7 @@ FILE /jvmStaticFieldReference.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestClass' PROPERTY public final val test: kotlin.Int - FIELD public final val test: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final val test: kotlin.Int EXPRESSION_BODY WHEN type=kotlin.Int operator=WHEN else: BLOCK type=kotlin.Int operator=null @@ -35,7 +35,7 @@ FILE /jvmStaticFieldReference.kt GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY p0: CONST String type=kotlin.String value='TestClass/test' CONST Int type=kotlin.Int value='42' - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/literals.txt b/compiler/testData/ir/irText/expressions/literals.txt index a6a4022a312..029b9d38675 100644 --- a/compiler/testData/ir/irText/expressions/literals.txt +++ b/compiler/testData/ir/irText/expressions/literals.txt @@ -1,137 +1,137 @@ FILE /literals.kt PROPERTY public val test1: kotlin.Int = 1 - FIELD public val test1: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test1: Int' type=kotlin.Int operator=null PROPERTY public val test2: kotlin.Int = -1 - FIELD public val test2: kotlin.Int = -1 + FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.Int = -1 EXPRESSION_BODY CONST Int type=kotlin.Int value='-1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'test2: Int' type=kotlin.Int operator=null PROPERTY public val test3: kotlin.Boolean = true - FIELD public val test3: kotlin.Boolean = true + FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.Boolean = true EXPRESSION_BODY CONST Boolean type=kotlin.Boolean value='true' - FUN public fun (): kotlin.Boolean + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='(): Boolean' GET_BACKING_FIELD 'test3: Boolean' type=kotlin.Boolean operator=null PROPERTY public val test4: kotlin.Boolean = false - FIELD public val test4: kotlin.Boolean = false + FIELD PROPERTY_BACKING_FIELD public val test4: kotlin.Boolean = false EXPRESSION_BODY CONST Boolean type=kotlin.Boolean value='false' - FUN public fun (): kotlin.Boolean + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='(): Boolean' GET_BACKING_FIELD 'test4: Boolean' type=kotlin.Boolean operator=null PROPERTY public val test5: kotlin.String = "abc" - FIELD public val test5: kotlin.String = "abc" + FIELD PROPERTY_BACKING_FIELD public val test5: kotlin.String = "abc" EXPRESSION_BODY CONST String type=kotlin.String value='abc' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test5: String' type=kotlin.String operator=null PROPERTY public val test6: kotlin.Nothing? = null - FIELD public val test6: kotlin.Nothing? = null + FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.Nothing? = null EXPRESSION_BODY CONST Null type=kotlin.Nothing? value='null' - FUN public fun (): kotlin.Nothing? + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Nothing? BLOCK_BODY RETURN type=kotlin.Nothing from='(): Nothing?' GET_BACKING_FIELD 'test6: Nothing?' type=kotlin.Nothing? operator=null PROPERTY public val test7: kotlin.Long = 1.toLong() - FIELD public val test7: kotlin.Long = 1.toLong() + FIELD PROPERTY_BACKING_FIELD public val test7: kotlin.Long = 1.toLong() EXPRESSION_BODY CONST Long type=kotlin.Long value='1' - FUN public fun (): kotlin.Long + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Long BLOCK_BODY RETURN type=kotlin.Nothing from='(): Long' GET_BACKING_FIELD 'test7: Long' type=kotlin.Long operator=null PROPERTY public val test8: kotlin.Long = -1.toLong() - FIELD public val test8: kotlin.Long = -1.toLong() + FIELD PROPERTY_BACKING_FIELD public val test8: kotlin.Long = -1.toLong() EXPRESSION_BODY CONST Long type=kotlin.Long value='-1' - FUN public fun (): kotlin.Long + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Long BLOCK_BODY RETURN type=kotlin.Nothing from='(): Long' GET_BACKING_FIELD 'test8: Long' type=kotlin.Long operator=null PROPERTY public val test9: kotlin.Double = 1.0.toDouble() - FIELD public val test9: kotlin.Double = 1.0.toDouble() + FIELD PROPERTY_BACKING_FIELD public val test9: kotlin.Double = 1.0.toDouble() EXPRESSION_BODY CONST Double type=kotlin.Double value='1.0' - FUN public fun (): kotlin.Double + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='(): Double' GET_BACKING_FIELD 'test9: Double' type=kotlin.Double operator=null PROPERTY public val test10: kotlin.Double = -1.0.toDouble() - FIELD public val test10: kotlin.Double = -1.0.toDouble() + FIELD PROPERTY_BACKING_FIELD public val test10: kotlin.Double = -1.0.toDouble() EXPRESSION_BODY CONST Double type=kotlin.Double value='-1.0' - FUN public fun (): kotlin.Double + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='(): Double' GET_BACKING_FIELD 'test10: Double' type=kotlin.Double operator=null PROPERTY public val test11: kotlin.Float = 1.0.toFloat() - FIELD public val test11: kotlin.Float = 1.0.toFloat() + FIELD PROPERTY_BACKING_FIELD public val test11: kotlin.Float = 1.0.toFloat() EXPRESSION_BODY CONST Float type=kotlin.Float value='1.0' - FUN public fun (): kotlin.Float + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='(): Float' GET_BACKING_FIELD 'test11: Float' type=kotlin.Float operator=null PROPERTY public val test12: kotlin.Float = -1.0.toFloat() - FIELD public val test12: kotlin.Float = -1.0.toFloat() + FIELD PROPERTY_BACKING_FIELD public val test12: kotlin.Float = -1.0.toFloat() EXPRESSION_BODY CONST Float type=kotlin.Float value='-1.0' - FUN public fun (): kotlin.Float + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='(): Float' GET_BACKING_FIELD 'test12: Float' type=kotlin.Float operator=null PROPERTY public val test13: kotlin.Char = \u0061 ('a') - FIELD public val test13: kotlin.Char = \u0061 ('a') + FIELD PROPERTY_BACKING_FIELD public val test13: kotlin.Char = \u0061 ('a') EXPRESSION_BODY CONST Char type=kotlin.Char value='a' - FUN public fun (): kotlin.Char + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Char BLOCK_BODY RETURN type=kotlin.Nothing from='(): Char' GET_BACKING_FIELD 'test13: Char' type=kotlin.Char operator=null PROPERTY public val testB: kotlin.Byte = 1.toByte() - FIELD public val testB: kotlin.Byte = 1.toByte() + FIELD PROPERTY_BACKING_FIELD public val testB: kotlin.Byte = 1.toByte() EXPRESSION_BODY CONST Byte type=kotlin.Byte value='1' - FUN public fun (): kotlin.Byte + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Byte BLOCK_BODY RETURN type=kotlin.Nothing from='(): Byte' GET_BACKING_FIELD 'testB: Byte' type=kotlin.Byte operator=null PROPERTY public val testS: kotlin.Short = 1.toShort() - FIELD public val testS: kotlin.Short = 1.toShort() + FIELD PROPERTY_BACKING_FIELD public val testS: kotlin.Short = 1.toShort() EXPRESSION_BODY CONST Short type=kotlin.Short value='1' - FUN public fun (): kotlin.Short + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Short BLOCK_BODY RETURN type=kotlin.Nothing from='(): Short' GET_BACKING_FIELD 'testS: Short' type=kotlin.Short operator=null PROPERTY public val testI: kotlin.Int = 1 - FIELD public val testI: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public val testI: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'testI: Int' type=kotlin.Int operator=null PROPERTY public val testL: kotlin.Long = 1.toLong() - FIELD public val testL: kotlin.Long = 1.toLong() + FIELD PROPERTY_BACKING_FIELD public val testL: kotlin.Long = 1.toLong() EXPRESSION_BODY CONST Long type=kotlin.Long value='1' - FUN public fun (): kotlin.Long + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Long BLOCK_BODY RETURN type=kotlin.Nothing from='(): Long' GET_BACKING_FIELD 'testL: Long' type=kotlin.Long operator=null diff --git a/compiler/testData/ir/irText/expressions/references.txt b/compiler/testData/ir/irText/expressions/references.txt index 0215daef163..006f797b59c 100644 --- a/compiler/testData/ir/irText/expressions/references.txt +++ b/compiler/testData/ir/irText/expressions/references.txt @@ -1,17 +1,17 @@ FILE /references.kt PROPERTY public val ok: kotlin.String = "OK" - FIELD public val ok: kotlin.String = "OK" + FIELD PROPERTY_BACKING_FIELD public val ok: kotlin.String = "OK" EXPRESSION_BODY CONST String type=kotlin.String value='OK' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'ok: String' type=kotlin.String operator=null PROPERTY public val ok2: kotlin.String = "OK" - FIELD public val ok2: kotlin.String = "OK" + FIELD PROPERTY_BACKING_FIELD public val ok2: kotlin.String = "OK" EXPRESSION_BODY CALL '(): String' type=kotlin.String operator=GET_PROPERTY - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'ok2: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt index beb8e3c6f52..9259260cce6 100644 --- a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt +++ b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt @@ -9,68 +9,68 @@ FILE /reflectionLiterals.kt FUN public fun bar(): kotlin.Unit BLOCK_BODY PROPERTY public val qux: kotlin.Int = 42 - FIELD public val qux: kotlin.Int = 42 + FIELD PROPERTY_BACKING_FIELD public val qux: kotlin.Int = 42 EXPRESSION_BODY CONST Int type=kotlin.Int value='42' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'qux: Int' type=kotlin.Int operator=null PROPERTY public val test1: kotlin.reflect.KClass - FIELD public val test1: kotlin.reflect.KClass + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KClass EXPRESSION_BODY CLASS_REFERENCE 'A' type=kotlin.reflect.KClass - FUN public fun (): kotlin.reflect.KClass + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KClass BLOCK_BODY RETURN type=kotlin.Nothing from='(): KClass' GET_BACKING_FIELD 'test1: KClass' type=kotlin.reflect.KClass operator=null PROPERTY public val test2: kotlin.reflect.KClass - FIELD public val test2: kotlin.reflect.KClass + FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.reflect.KClass EXPRESSION_BODY GET_CLASS type=kotlin.reflect.KClass CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY - FUN public fun (): kotlin.reflect.KClass + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KClass BLOCK_BODY RETURN type=kotlin.Nothing from='(): KClass' GET_BACKING_FIELD 'test2: KClass' type=kotlin.reflect.KClass operator=null PROPERTY public val test3: kotlin.reflect.KFunction1 - FIELD public val test3: kotlin.reflect.KFunction1 + FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.reflect.KFunction1 EXPRESSION_BODY CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction1 operator=null - FUN public fun (): kotlin.reflect.KFunction1 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction1 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction1' GET_BACKING_FIELD 'test3: KFunction1' type=kotlin.reflect.KFunction1 operator=null PROPERTY public val test4: kotlin.reflect.KFunction0 - FIELD public val test4: kotlin.reflect.KFunction0 + FIELD PROPERTY_BACKING_FIELD public val test4: kotlin.reflect.KFunction0 EXPRESSION_BODY CALLABLE_REFERENCE 'constructor A()' type=kotlin.reflect.KFunction0 operator=null - FUN public fun (): kotlin.reflect.KFunction0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction0' GET_BACKING_FIELD 'test4: KFunction0' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test5: kotlin.reflect.KFunction0 - FIELD public val test5: kotlin.reflect.KFunction0 + FIELD PROPERTY_BACKING_FIELD public val test5: kotlin.reflect.KFunction0 EXPRESSION_BODY CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0 operator=null $this: CALL 'constructor A()' type=A operator=null - FUN public fun (): kotlin.reflect.KFunction0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction0' GET_BACKING_FIELD 'test5: KFunction0' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test6: kotlin.reflect.KFunction0 - FIELD public val test6: kotlin.reflect.KFunction0 + FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.reflect.KFunction0 EXPRESSION_BODY CALLABLE_REFERENCE 'bar(): Unit' type=kotlin.reflect.KFunction0 operator=null - FUN public fun (): kotlin.reflect.KFunction0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KFunction0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KFunction0' GET_BACKING_FIELD 'test6: KFunction0' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test7: kotlin.reflect.KProperty0 - FIELD public val test7: kotlin.reflect.KProperty0 + FIELD PROPERTY_BACKING_FIELD public val test7: kotlin.reflect.KProperty0 EXPRESSION_BODY CALLABLE_REFERENCE 'qux: Int' type=kotlin.reflect.KProperty0 operator=null - FUN public fun (): kotlin.reflect.KProperty0 + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.reflect.KProperty0 BLOCK_BODY RETURN type=kotlin.Nothing from='(): KProperty0' GET_BACKING_FIELD 'test7: KProperty0' type=kotlin.reflect.KProperty0 operator=null diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt index 6033114b131..4e7e01651da 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt @@ -15,7 +15,7 @@ FILE /safeCallWithIncrementDecrement.kt BLOCK_BODY RETURN type=kotlin.Nothing from='inc() on Int?: Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.Int? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Int? $RECEIVER of 'inc() on Int?: Int?' type=kotlin.Int? WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -33,7 +33,7 @@ FILE /safeCallWithIncrementDecrement.kt FUN public fun testProperty(nc: test.C?): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: test.C? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: test.C? GET_VAR 'value-parameter nc: C?' type=test.C? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -41,10 +41,10 @@ FILE /safeCallWithIncrementDecrement.kt arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' else: BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp1_this: test.C? + VAR IR_TEMPORARY_VARIABLE val tmp1_this: test.C? GET_VAR 'tmp0_safe_receiver: C?' type=test.C? operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp2: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int CALL '() on C?: Int' type=kotlin.Int operator=POSTFIX_INCR $this: GET_VAR 'tmp1_this: C?' type=test.C? operator=null CALL '(Int) on C?: Unit' type=kotlin.Unit operator=POSTFIX_INCR @@ -55,9 +55,9 @@ FILE /safeCallWithIncrementDecrement.kt FUN public fun testArrayAccess(nc: test.C?): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp3_array: kotlin.Int? + VAR IR_TEMPORARY_VARIABLE val tmp3_array: kotlin.Int? BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: test.C? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: test.C? GET_VAR 'value-parameter nc: C?' type=test.C? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -66,9 +66,9 @@ FILE /safeCallWithIncrementDecrement.kt then: CONST Null type=kotlin.Nothing? value='null' else: CALL '() on C?: Int' type=kotlin.Int operator=GET_PROPERTY $this: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? operator=null - VAR val tmp4_index0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp4_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - VAR val tmp5: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int CALL 'get(Int) on Int?: Int' type=kotlin.Int operator=POSTFIX_INCR $receiver: GET_VAR 'tmp3_array: Int?' type=kotlin.Int? operator=null index: GET_VAR 'tmp4_index0: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/safeCalls.txt b/compiler/testData/ir/irText/expressions/safeCalls.txt index c93005655a1..b2318616844 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.txt @@ -5,15 +5,15 @@ FILE /safeCalls.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Ref' PROPERTY public final var value: kotlin.Int - FIELD public final var value: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public final var value: kotlin.Int EXPRESSION_BODY GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'value: Int' type=kotlin.Int operator=null receiver: THIS of 'Ref' type=Ref - FUN public final fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public final fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=null receiver: THIS of 'Ref' type=Ref @@ -28,7 +28,7 @@ FILE /safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test1(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -41,7 +41,7 @@ FILE /safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test2(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -54,7 +54,7 @@ FILE /safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test3(String?, Any?): Boolean?' BLOCK type=kotlin.Boolean? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Boolean? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -67,7 +67,7 @@ FILE /safeCalls.kt FUN public fun test4(x: Ref?): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit? operator=SAFE_CALL - VAR val tmp0_safe_receiver: Ref? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: Ref? GET_VAR 'value-parameter x: Ref?' type=Ref? operator=null WHEN type=kotlin.Unit? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -81,7 +81,7 @@ FILE /safeCalls.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test5(String?) on IHost: Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter s: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt index baaafb386a7..78e69a7adfe 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt @@ -16,7 +16,7 @@ FILE /smartCastsWithDestructuring.kt GET_VAR 'value-parameter x: I1' type=I1 operator=null then: RETURN type=kotlin.Nothing from='test(I1): Unit' COMPOSITE type=kotlin.Unit operator=DESTRUCTURING_DECLARATION - VAR val tmp0_container: I1 + VAR IR_TEMPORARY_VARIABLE val tmp0_container: I1 GET_VAR 'value-parameter x: I1' type=I1 operator=null VAR val c1: kotlin.Int CALL 'component1() on I1: Int' type=kotlin.Int operator=COMPONENT_N(index=1) diff --git a/compiler/testData/ir/irText/expressions/smoke.txt b/compiler/testData/ir/irText/expressions/smoke.txt index 290b400050f..de769d72617 100644 --- a/compiler/testData/ir/irText/expressions/smoke.txt +++ b/compiler/testData/ir/irText/expressions/smoke.txt @@ -4,10 +4,10 @@ FILE /smoke.kt RETURN type=kotlin.Nothing from='testFun(): String' CONST String type=kotlin.String value='OK' PROPERTY public val testSimpleVal: kotlin.Int = 1 - FIELD public val testSimpleVal: kotlin.Int = 1 + FIELD PROPERTY_BACKING_FIELD public val testSimpleVal: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'testSimpleVal: Int' type=kotlin.Int operator=null @@ -17,14 +17,14 @@ FILE /smoke.kt RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' PROPERTY public var testSimpleVar: kotlin.Int - FIELD public var testSimpleVar: kotlin.Int + FIELD PROPERTY_BACKING_FIELD public var testSimpleVar: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='2' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'testSimpleVar: Int' type=kotlin.Int operator=null - FUN public fun (: kotlin.Int): kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (: kotlin.Int): kotlin.Unit BLOCK_BODY SET_BACKING_FIELD 'testSimpleVar: Int' type=kotlin.Unit operator=null value: GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.txt b/compiler/testData/ir/irText/expressions/stringTemplates.txt index 73aea66f2a7..e413207e38e 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.txt @@ -4,41 +4,41 @@ FILE /stringTemplates.kt RETURN type=kotlin.Nothing from='foo(): String' CONST String type=kotlin.String value='' PROPERTY public val test1: kotlin.String = "" - FIELD public val test1: kotlin.String = "" + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.String = "" EXPRESSION_BODY CONST String type=kotlin.String value='' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test1: String' type=kotlin.String operator=null PROPERTY public val test2: kotlin.String = "abc" - FIELD public val test2: kotlin.String = "abc" + FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.String = "abc" EXPRESSION_BODY CONST String type=kotlin.String value='abc' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test2: String' type=kotlin.String operator=null PROPERTY public val test3: kotlin.String = "" - FIELD public val test3: kotlin.String = "" + FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.String = "" EXPRESSION_BODY CONST String type=kotlin.String value='' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test3: String' type=kotlin.String operator=null PROPERTY public val test4: kotlin.String = "abc" - FIELD public val test4: kotlin.String = "abc" + FIELD PROPERTY_BACKING_FIELD public val test4: kotlin.String = "abc" EXPRESSION_BODY CONST String type=kotlin.String value='abc' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test4: String' type=kotlin.String operator=null PROPERTY public val test5: kotlin.String = " abc " - FIELD public val test5: kotlin.String = " + FIELD PROPERTY_BACKING_FIELD public val test5: kotlin.String = " abc " EXPRESSION_BODY @@ -48,18 +48,18 @@ abc CONST String type=kotlin.String value='abc' CONST String type=kotlin.String value=' ' - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test5: String' type=kotlin.String operator=null PROPERTY public val test6: kotlin.String - FIELD public val test6: kotlin.String + FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.String EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String CALL '(): String' type=kotlin.String operator=GET_PROPERTY CONST String type=kotlin.String value=' ' CALL 'foo(): String' type=kotlin.String operator=null - FUN public fun (): kotlin.String + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_BACKING_FIELD 'test6: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/values.txt b/compiler/testData/ir/irText/expressions/values.txt index 51c4daf7a5e..5ceb170f857 100644 --- a/compiler/testData/ir/irText/expressions/values.txt +++ b/compiler/testData/ir/irText/expressions/values.txt @@ -6,9 +6,9 @@ FILE /values.kt INSTANCE_INITIALIZER_CALL classDescriptor='Enum' ENUM_ENTRY enum entry A init: ENUM_CONSTRUCTOR_CALL 'constructor Enum()' A - FUN public final fun values(): kotlin.Array + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final fun valueOf(value: kotlin.String): Enum + FUN ENUM_CLASS_SPECIAL_MEMBER public final fun valueOf(value: kotlin.String): Enum SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS OBJECT A CONSTRUCTOR private constructor A() @@ -16,10 +16,10 @@ FILE /values.kt DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='A' PROPERTY public val a: kotlin.Int = 0 - FIELD public val a: kotlin.Int = 0 + FIELD PROPERTY_BACKING_FIELD public val a: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun (): kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' GET_BACKING_FIELD 'a: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/vararg.txt b/compiler/testData/ir/irText/expressions/vararg.txt index 80676878b1b..d1bd130ed98 100644 --- a/compiler/testData/ir/irText/expressions/vararg.txt +++ b/compiler/testData/ir/irText/expressions/vararg.txt @@ -1,26 +1,26 @@ FILE /vararg.kt PROPERTY public val test1: kotlin.Array - FIELD public val test1: kotlin.Array + FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.Array EXPRESSION_BODY CALL 'arrayOf(vararg String): Array' type=kotlin.Array operator=null - FUN public fun (): kotlin.Array + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Array BLOCK_BODY RETURN type=kotlin.Nothing from='(): Array' GET_BACKING_FIELD 'test1: Array' type=kotlin.Array operator=null PROPERTY public val test2: kotlin.Array - FIELD public val test2: kotlin.Array + FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.Array EXPRESSION_BODY CALL 'arrayOf(vararg String): Array' type=kotlin.Array operator=null elements: VARARG type=Array varargElementType=String CONST String type=kotlin.String value='1' CONST String type=kotlin.String value='2' CONST String type=kotlin.String value='3' - FUN public fun (): kotlin.Array + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Array BLOCK_BODY RETURN type=kotlin.Nothing from='(): Array' GET_BACKING_FIELD 'test2: Array' type=kotlin.Array operator=null PROPERTY public val test3: kotlin.Array - FIELD public val test3: kotlin.Array + FIELD PROPERTY_BACKING_FIELD public val test3: kotlin.Array EXPRESSION_BODY CALL 'arrayOf(vararg String): Array' type=kotlin.Array operator=null elements: VARARG type=Array varargElementType=String @@ -30,7 +30,7 @@ FILE /vararg.kt SPREAD_ELEMENT CALL '(): Array' type=kotlin.Array operator=GET_PROPERTY CONST String type=kotlin.String value='4' - FUN public fun (): kotlin.Array + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Array BLOCK_BODY RETURN type=kotlin.Nothing from='(): Array' GET_BACKING_FIELD 'test3: Array' type=kotlin.Array operator=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 81836768ac5..ad43e54cf22 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -3,7 +3,7 @@ FILE /variableAsFunctionCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from='k() on String: () -> String' BLOCK type=() -> kotlin.String operator=LAMBDA - FUN local final fun (): kotlin.String + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' $RECEIVER of 'k() on String: () -> String' type=kotlin.String @@ -29,9 +29,9 @@ FILE /variableAsFunctionCall.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test4(String?): String?' BLOCK type=kotlin.String? operator=SAFE_CALL - VAR val tmp1_safe_receiver: (() -> kotlin.String)? + VAR IR_TEMPORARY_VARIABLE val tmp1_safe_receiver: (() -> kotlin.String)? BLOCK type=(() -> kotlin.String)? operator=SAFE_CALL - VAR val tmp0_safe_receiver: kotlin.String? + VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String? GET_VAR 'value-parameter ns: String?' type=kotlin.String? operator=null WHEN type=(() -> kotlin.String)? operator=SAFE_CALL if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index 1d4a4fc8a16..9e98bf3e47c 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -8,7 +8,7 @@ FILE /when.kt BLOCK_BODY RETURN type=kotlin.Nothing from='testWithSubject(Any?): String' BLOCK type=kotlin.String operator=WHEN - VAR val tmp0_subject: kotlin.Any? + VAR IR_TEMPORARY_VARIABLE val tmp0_subject: kotlin.Any? GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.String operator=WHEN if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -51,7 +51,7 @@ FILE /when.kt BLOCK_BODY RETURN type=kotlin.Nothing from='testComma(Int): String' BLOCK type=kotlin.String operator=WHEN - VAR val tmp0_subject: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0_subject: kotlin.Int GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null WHEN type=kotlin.String operator=WHEN if: WHEN type=kotlin.Boolean operator=WHEN_COMMA diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.txt index 0b2b7a97b00..153caaacf52 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.txt @@ -14,7 +14,7 @@ FILE /whileDoWhile.kt $this: GET_VAR 'x: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='5' body: BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR @@ -27,7 +27,7 @@ FILE /whileDoWhile.kt other: CONST Int type=kotlin.Int value='10' body: BLOCK type=kotlin.Int operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp1: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR @@ -40,7 +40,7 @@ FILE /whileDoWhile.kt other: CONST Int type=kotlin.Int value='0' DO_WHILE label=null operator=DO_WHILE_LOOP body: BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp2: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR @@ -53,7 +53,7 @@ FILE /whileDoWhile.kt DO_WHILE label=null operator=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp3: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt index 07c814eeac1..e039673f7be 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt @@ -1,13 +1,13 @@ FILE /anonymousFunction.kt PROPERTY public val anonymous: () -> kotlin.Unit - FIELD public val anonymous: () -> kotlin.Unit + FIELD PROPERTY_BACKING_FIELD public val anonymous: () -> kotlin.Unit EXPRESSION_BODY BLOCK type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION FUN local final fun (): kotlin.Unit BLOCK_BODY CALL 'println(): Unit' type=kotlin.Unit operator=null CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION - FUN public fun (): () -> kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): () -> kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' GET_BACKING_FIELD 'anonymous: () -> Unit' type=() -> kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 86adc1124c8..3f4cd830c1e 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -5,7 +5,7 @@ FILE /extensionLambda.kt CALL 'run(String.() -> Int) on String: Int' type=kotlin.Int operator=null $receiver: CONST String type=kotlin.String value='42' block: BLOCK type=kotlin.String.() -> kotlin.Int operator=LAMBDA - FUN local final fun kotlin.String.(): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun kotlin.String.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on String: Int' CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY diff --git a/compiler/testData/ir/irText/lambdas/justLambda.txt b/compiler/testData/ir/irText/lambdas/justLambda.txt index 18289b5a012..22240645431 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.txt @@ -1,26 +1,26 @@ FILE /justLambda.kt PROPERTY public val test1: () -> kotlin.Int - FIELD public val test1: () -> kotlin.Int + FIELD PROPERTY_BACKING_FIELD public val test1: () -> kotlin.Int EXPRESSION_BODY BLOCK type=() -> kotlin.Int operator=LAMBDA - FUN local final fun (): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA - FUN public fun (): () -> kotlin.Int + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): () -> kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Int' GET_BACKING_FIELD 'test1: () -> Int' type=() -> kotlin.Int operator=null PROPERTY public val test2: () -> kotlin.Unit - FIELD public val test2: () -> kotlin.Unit + FIELD PROPERTY_BACKING_FIELD public val test2: () -> kotlin.Unit EXPRESSION_BODY BLOCK type=() -> kotlin.Unit operator=LAMBDA - FUN local final fun (): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA - FUN public fun (): () -> kotlin.Unit + FUN DEFAULT_PROPERTY_ACCESSOR public fun (): () -> kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): () -> Unit' GET_BACKING_FIELD 'test2: () -> Unit' type=() -> kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/lambdas/localFunction.txt b/compiler/testData/ir/irText/lambdas/localFunction.txt index cabf630232d..f56595c6daa 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.txt @@ -6,7 +6,7 @@ FILE /localFunction.kt FUN local final fun local(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR - VAR val tmp0: kotlin.Int + VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int operator=POSTFIX_INCR SET_VAR 'x: Int' type=kotlin.Unit operator=POSTFIX_INCR CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 47f21512fbe..85d82d29d83 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -25,19 +25,19 @@ FILE /multipleImplicitReceivers.kt CALL 'with(A, A.() -> Int): Int' type=kotlin.Int operator=null receiver: GET_OBJECT 'A' type=A block: BLOCK type=A.() -> kotlin.Int operator=LAMBDA - FUN local final fun A.(): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun A.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on A: Int' CALL 'with(IFoo, IFoo.() -> Int): Int' type=kotlin.Int operator=null receiver: GET_VAR 'value-parameter fooImpl: IFoo' type=IFoo operator=null block: BLOCK type=IFoo.() -> kotlin.Int operator=LAMBDA - FUN local final fun IFoo.(): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IFoo.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on IFoo: Int' CALL 'with(IInvoke, IInvoke.() -> Int): Int' type=kotlin.Int operator=null receiver: GET_VAR 'value-parameter invokeImpl: IInvoke' type=IInvoke operator=null block: BLOCK type=IInvoke.() -> kotlin.Int operator=LAMBDA - FUN local final fun IInvoke.(): kotlin.Int + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun IInvoke.(): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='() on IInvoke: Int' CALL 'invoke() on B: Int' type=kotlin.Int operator=INVOKE diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt index 2bf31170c5b..0eb6330bd6f 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt @@ -3,7 +3,7 @@ FILE /nonLocalReturn.kt BLOCK_BODY CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing operator=null block: BLOCK type=() -> kotlin.Nothing operator=LAMBDA - FUN local final fun (): kotlin.Nothing + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Nothing BLOCK_BODY RETURN type=kotlin.Nothing from='test0(): Unit' CALLABLE_REFERENCE '(): Nothing' type=() -> kotlin.Nothing operator=LAMBDA @@ -11,7 +11,7 @@ FILE /nonLocalReturn.kt BLOCK_BODY CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null block: BLOCK type=() -> kotlin.Unit operator=LAMBDA - FUN local final fun (): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA @@ -19,7 +19,7 @@ FILE /nonLocalReturn.kt BLOCK_BODY CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null block: BLOCK type=() -> kotlin.Unit operator=LAMBDA - FUN local final fun (): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA @@ -28,7 +28,7 @@ FILE /nonLocalReturn.kt CALL 'forEach((Int) -> Unit) on Iterable: Unit' type=kotlin.Unit operator=null $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List operator=null action: BLOCK type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA - FUN local final fun (it: kotlin.Int): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (it: kotlin.Int): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ @@ -44,7 +44,7 @@ FILE /nonLocalReturn.kt CALL 'forEach((Int) -> Unit) on Iterable: Unit' type=kotlin.Unit operator=null $receiver: GET_VAR 'value-parameter ints: List' type=kotlin.collections.List operator=null action: BLOCK type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA - FUN local final fun (it: kotlin.Int): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (it: kotlin.Int): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.txt b/compiler/testData/ir/irText/lambdas/samAdapter.txt index 72aac122f9c..66dda5dd577 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.txt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.txt @@ -4,7 +4,7 @@ FILE /samAdapter.kt VAR val hello: java.lang.Runnable CALL 'Runnable(() -> Unit): Runnable' type=java.lang.Runnable operator=null function: BLOCK type=() -> kotlin.Unit operator=LAMBDA - FUN local final fun (): kotlin.Unit + FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALL 'println(Any?): Unit' type=kotlin.Unit operator=null