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 826cc54b6fe..2efed2d5878 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 @@ -34,49 +34,49 @@ class RenderIrElementVisitor : IrElementVisitor { "? ${element.javaClass.simpleName}" override fun visitDeclaration(declaration: IrDeclaration, data: Nothing?): String = - "? ${declaration.javaClass.simpleName} ${declaration.descriptor.name}" + "? ${declaration.javaClass.simpleName} ${declaration.descriptor.ref()}" override fun visitModule(declaration: IrModule, data: Nothing?): String = - "MODULE ${declaration.descriptor.name}" + "MODULE ${declaration.descriptor.ref()}" override fun visitFile(declaration: IrFile, data: Nothing?): String = "FILE ${declaration.name}" override fun visitFunction(declaration: IrFunction, data: Nothing?): String = - "FUN ${declaration.descriptor.render()}" + "FUN ${declaration.renderDeclared()}" override fun visitConstructor(declaration: IrConstructor, data: Nothing?): String = - "CONSTRUCTOR ${declaration.descriptor.render()}" + "CONSTRUCTOR ${declaration.renderDeclared()}" override fun visitProperty(declaration: IrProperty, data: Nothing?): String = - "PROPERTY ${declaration.descriptor.render()}" + "PROPERTY ${declaration.renderDeclared()}" override fun visitPropertyGetter(declaration: IrPropertyGetter, data: Nothing?): String = - "PROPERTY_GETTER ${declaration.descriptor.render()}" + "PROPERTY_GETTER ${declaration.renderDeclared()}" override fun visitPropertySetter(declaration: IrPropertySetter, data: Nothing?): String = - "PROPERTY_SETTER ${declaration.descriptor.render()}" + "PROPERTY_SETTER ${declaration.renderDeclared()}" override fun visitClass(declaration: IrClass, data: Nothing?): String = - "CLASS ${declaration.descriptor.kind} ${declaration.descriptor.name}" + "CLASS ${declaration.descriptor.kind} ${declaration.descriptor.ref()}" override fun visitTypeAlias(declaration: IrTypeAlias, data: Nothing?): String = - "TYPEALIAS ${declaration.descriptor.name} type=${declaration.descriptor.underlyingType.render()}" + "TYPEALIAS ${declaration.descriptor.ref()} type=${declaration.descriptor.underlyingType.render()}" override fun visitVariable(declaration: IrVariable, data: Nothing?): String = - "VAR ${declaration.descriptor.render()}" + "VAR ${declaration.renderDeclared()}" override fun visitEnumEntry(declaration: IrEnumEntry, data: Nothing?): String = - "ENUM_ENTRY ${declaration.descriptor.render()}" + "ENUM_ENTRY ${declaration.renderDeclared()}" override fun visitAnonymousInitializer(declaration: IrAnonymousInitializer, data: Nothing?): String = - "ANONYMOUS_INITIALIZER ${declaration.descriptor.name}" + "ANONYMOUS_INITIALIZER ${declaration.descriptor.ref()}" override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty, data: Nothing?): String = - "LOCAL_DELEGATED_PROPERTY ${declaration.descriptor.render()}" + "LOCAL_DELEGATED_PROPERTY ${declaration.renderDeclared()}" override fun visitLocalPropertyAccessor(declaration: IrLocalPropertyAccessor, data: Nothing?): String = - "LOCAL_PROPERTY_ACCESSOR ${declaration.descriptor.name}" // can't render, see nullability for modality + "LOCAL_PROPERTY_ACCESSOR ${declaration.descriptor.ref()}" // can't render, see nullability for modality override fun visitExpressionBody(body: IrExpressionBody, data: Nothing?): String = "EXPRESSION_BODY" @@ -103,51 +103,51 @@ class RenderIrElementVisitor : IrElementVisitor { "BLOCK type=${expression.type.render()} operator=${expression.operator}" override fun visitReturn(expression: IrReturn, data: Nothing?): String = - "RETURN type=${expression.type.render()} from=${expression.returnTarget.name}" + "RETURN type=${expression.type.render()} from='${expression.returnTarget.ref()}'" override fun visitGetExtensionReceiver(expression: IrGetExtensionReceiver, data: Nothing?): String = - "\$RECEIVER of: ${expression.descriptor.containingDeclaration.name} type=${expression.type.render()}" + "\$RECEIVER of '${expression.descriptor.containingDeclaration.ref()}' type=${expression.type.render()}" override fun visitThisReference(expression: IrThisReference, data: Nothing?): String = - "THIS ${expression.classDescriptor.render()} type=${expression.type.render()}" + "THIS of '${expression.classDescriptor.ref()}' type=${expression.type.render()}" override fun visitCall(expression: IrCall, data: Nothing?): String = - "CALL .${expression.descriptor.name} ${expression.renderSuperQualifier()}" + + "CALL '${expression.descriptor.ref()}' ${expression.renderSuperQualifier()}" + "type=${expression.type.render()} operator=${expression.operator}" private fun IrCall.renderSuperQualifier(): String = superQualifier?.let { "superQualifier=${it.name} " } ?: "" override fun visitDelegatingConstructorCall(expression: IrDelegatingConstructorCall, data: Nothing?): String = - "DELEGATING_CONSTRUCTOR_CALL ${expression.descriptor.containingDeclaration.name}" + "DELEGATING_CONSTRUCTOR_CALL '${expression.descriptor.ref()}'" override fun visitEnumConstructorCall(expression: IrEnumConstructorCall, data: Nothing?): String = - "ENUM_CONSTRUCTOR_CALL ${expression.descriptor.containingDeclaration.name} " + + "ENUM_CONSTRUCTOR_CALL '${expression.descriptor.ref()}' " + expression.enumEntryDescriptor.let { enumEntryDescriptor -> if (enumEntryDescriptor == null) "super" - else enumEntryDescriptor.name + else enumEntryDescriptor.ref() } override fun visitInstanceInitializerCall(expression: IrInstanceInitializerCall, data: Nothing?): String = - "INSTANCE_INITIALIZER_CALL classDescriptor=${expression.classDescriptor.name}" + "INSTANCE_INITIALIZER_CALL classDescriptor='${expression.classDescriptor.ref()}'" override fun visitGetVariable(expression: IrGetVariable, data: Nothing?): String = - "GET_VAR ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" + "GET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" override fun visitSetVariable(expression: IrSetVariable, data: Nothing?): String = - "SET_VAR ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" + "SET_VAR '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" override fun visitGetBackingField(expression: IrGetBackingField, data: Nothing?): String = - "GET_BACKING_FIELD ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" + "GET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" override fun visitSetBackingField(expression: IrSetBackingField, data: Nothing?): String = - "SET_BACKING_FIELD ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" + "SET_BACKING_FIELD '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" override fun visitGetObjectValue(expression: IrGetObjectValue, data: Nothing?): String = - "GET_OBJECT ${expression.descriptor.name} type=${expression.type.render()}" + "GET_OBJECT '${expression.descriptor.ref()}' type=${expression.type.render()}" override fun visitGetEnumValue(expression: IrGetEnumValue, data: Nothing?): String = - "GET_ENUM_VALUE ${expression.descriptor.name} type=${expression.type.render()}" + "GET_ENUM_VALUE '${expression.descriptor.ref()}' type=${expression.type.render()}" override fun visitStringConcatenation(expression: IrStringConcatenation, data: Nothing?): String = "STRING_CONCATENATION type=${expression.type.render()}" @@ -174,10 +174,10 @@ class RenderIrElementVisitor : IrElementVisitor { "THROW type=${expression.type.render()}" override fun visitCallableReference(expression: IrCallableReference, data: Nothing?): String = - "CALLABLE_REFERENCE ${expression.descriptor.name} type=${expression.type.render()} operator=${expression.operator}" + "CALLABLE_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()} operator=${expression.operator}" override fun visitClassReference(expression: IrClassReference, data: Nothing?): String = - "CLASS_REFERENCE ${expression.descriptor.name} type=${expression.type.render()}" + "CLASS_REFERENCE '${expression.descriptor.ref()}' type=${expression.type.render()}" override fun visitGetClass(expression: IrGetClass, data: Nothing?): String = "GET_CLASS type=${expression.type.render()}" @@ -186,7 +186,7 @@ class RenderIrElementVisitor : IrElementVisitor { "TRY_CATCH type=${tryCatch.type.render()}" override fun visitErrorDeclaration(declaration: IrErrorDeclaration, data: Nothing?): String = - "ERROR_DECL ${declaration.descriptor.javaClass.simpleName} ${declaration.descriptor.name}" + "ERROR_DECL ${declaration.descriptor.javaClass.simpleName} ${declaration.descriptor.ref()}" override fun visitErrorExpression(expression: IrErrorExpression, data: Nothing?): String = "ERROR_EXPR '${expression.description}' type=${expression.type.render()}" @@ -195,22 +195,27 @@ class RenderIrElementVisitor : IrElementVisitor { "ERROR_CALL '${expression.description}' type=${expression.type.render()}" companion object { - private val DESCRIPTOR_RENDERER = DescriptorRenderer.withOptions { + val DECLARATION_RENDERER = DescriptorRenderer.withOptions { withDefinedIn = false overrideRenderingPolicy = OverrideRenderingPolicy.RENDER_OPEN_OVERRIDE includePropertyConstant = true classifierNamePolicy = ClassifierNamePolicy.FULLY_QUALIFIED - verbose = true + verbose = false modifiers = DescriptorRendererModifier.ALL } + + val REFERENCE_RENDERER = DescriptorRenderer.ONLY_NAMES_WITH_SHORT_TYPES internal fun IrDeclaration.name(): String = descriptor.let { it.name.toString() } - internal fun DeclarationDescriptor.render(): String = - DESCRIPTOR_RENDERER.render(this) + internal fun IrDeclaration.renderDeclared(): String = + DECLARATION_RENDERER.render(this.descriptor) + + internal fun DeclarationDescriptor.ref(): String = + REFERENCE_RENDERER.render(this) internal fun KotlinType.render(): String = - DESCRIPTOR_RENDERER.renderType(this) + DECLARATION_RENDERER.renderType(this) } } \ 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 b63be31379f..4eacab9a08d 100644 --- a/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/argumentReorderingInDelegatingConstructorCall.txt @@ -1,52 +1,52 @@ FILE /argumentReorderingInDelegatingConstructorCall.kt CLASS CLASS Base - CONSTRUCTOR public constructor Base(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) + CONSTRUCTOR public constructor Base(x: kotlin.Int, y: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public open class Base type=Base - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public open class Base type=Base - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Base' type=Base + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Base' type=Base + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Base' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS CLASS Test1 - CONSTRUCTOR public constructor Test1(/*0*/ xx: kotlin.Int, /*1*/ yy: kotlin.Int) + 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 - GET_VAR yy type=kotlin.Int operator=null + GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null VAR val tmp1_x: kotlin.Int - GET_VAR xx type=kotlin.Int operator=null - DELEGATING_CONSTRUCTOR_CALL Base - x: GET_VAR tmp1_x type=kotlin.Int operator=null - y: GET_VAR tmp0_y type=kotlin.Int operator=null - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 + 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 + y: GET_VAR 'tmp0_y: Int' type=kotlin.Int operator=null + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' CLASS CLASS Test2 - CONSTRUCTOR public constructor Test2(/*0*/ xx: kotlin.Int, /*1*/ yy: kotlin.Int) + 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 - GET_VAR yy type=kotlin.Int operator=null + GET_VAR 'value-parameter yy: Int' type=kotlin.Int operator=null VAR val tmp1_x: kotlin.Int - GET_VAR xx type=kotlin.Int operator=null - DELEGATING_CONSTRUCTOR_CALL Base - x: GET_VAR tmp1_x type=kotlin.Int operator=null - y: GET_VAR tmp0_y type=kotlin.Int operator=null - INSTANCE_INITIALIZER_CALL classDescriptor=Test2 - CONSTRUCTOR public constructor Test2(/*0*/ xxx: kotlin.Int, /*1*/ yyy: kotlin.Int, /*2*/ a: kotlin.Any) + 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 + y: GET_VAR 'tmp0_y: Int' type=kotlin.Int operator=null + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' + 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 - GET_VAR yyy type=kotlin.Int operator=null + GET_VAR 'value-parameter yyy: Int' type=kotlin.Int operator=null VAR val tmp1_xx: kotlin.Int - GET_VAR xxx type=kotlin.Int operator=null - DELEGATING_CONSTRUCTOR_CALL Test2 - xx: GET_VAR tmp1_xx type=kotlin.Int operator=null - yy: GET_VAR tmp0_yy type=kotlin.Int operator=null + 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 + yy: GET_VAR 'tmp0_yy: 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 130346ceb31..332819f90d8 100644 --- a/compiler/testData/ir/irText/classes/classMembers.txt +++ b/compiler/testData/ir/irText/classes/classMembers.txt @@ -1,26 +1,26 @@ FILE /classMembers.kt CLASS CLASS C - CONSTRUCTOR public constructor C(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int, /*2*/ z: kotlin.Int = ...) + CONSTRUCTOR public constructor C(x: kotlin.Int, y: kotlin.Int, z: kotlin.Int = ...) z: EXPRESSION_BODY CONST Int type=kotlin.Int value='1' BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final class C type=C - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD z type=kotlin.Unit operator=null - receiver: THIS public final class C type=C - value: GET_VAR z type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'C' type=C + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null + receiver: THIS of 'C' type=C + value: GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final var z: kotlin.Int EXPRESSION_BODY - GET_VAR z type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter z: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL C + DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int, Int, Int = ...)' x: CONST Int type=kotlin.Int value='0' y: CONST Int type=kotlin.Int value='0' z: CONST Int type=kotlin.Int value='0' @@ -30,49 +30,49 @@ FILE /classMembers.kt PROPERTY public final val propertyWithGet: kotlin.Int PROPERTY_GETTER public final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' PROPERTY public final var propertyWithGetAndSet: kotlin.Int PROPERTY_GETTER public final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final class C type=C - PROPERTY_SETTER public final fun (/*0*/ value: kotlin.Int): kotlin.Unit + RETURN type=kotlin.Nothing from='(): Int' + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'C' type=C + PROPERTY_SETTER public final fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - CALL . type=kotlin.Unit operator=EQ - $this: THIS public final class C type=C - : GET_VAR value type=kotlin.Int operator=null + CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: THIS of 'C' type=C + : GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null FUN public final fun function(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='1' FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='2' CLASS CLASS NestedClass CONSTRUCTOR public constructor NestedClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=NestedClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='NestedClass' FUN public final fun function(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='3' FUN public final fun kotlin.Int.memberExtensionFunction(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='4' CLASS INTERFACE NestedInterface FUN public abstract fun foo(): kotlin.Unit FUN public open fun bar(): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from=bar - CALL .foo type=kotlin.Unit operator=null - $this: THIS public interface NestedInterface type=C.NestedInterface - CLASS OBJECT Companion + RETURN type=kotlin.Nothing from='bar(): Unit' + CALL 'foo(): Unit' type=kotlin.Unit operator=null + $this: THIS of 'NestedInterface' type=C.NestedInterface + CLASS OBJECT companion object of C CONSTRUCTOR private constructor Companion() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Companion + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='companion object of C' diff --git a/compiler/testData/ir/irText/classes/classes.txt b/compiler/testData/ir/irText/classes/classes.txt index 39b4cef07ee..6c6d012d856 100644 --- a/compiler/testData/ir/irText/classes/classes.txt +++ b/compiler/testData/ir/irText/classes/classes.txt @@ -2,25 +2,25 @@ FILE /classes.kt CLASS CLASS TestClass CONSTRUCTOR public constructor TestClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestClass' CLASS INTERFACE TestInterface CLASS OBJECT TestObject CONSTRUCTOR private constructor TestObject() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestObject + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestObject' CLASS ANNOTATION_CLASS TestAnnotationClass CONSTRUCTOR public constructor TestAnnotationClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestAnnotationClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestAnnotationClass' CLASS ENUM_CLASS TestEnumClass CONSTRUCTOR private constructor TestEnumClass() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - INSTANCE_INITIALIZER_CALL classDescriptor=TestEnumClass - FUN public final /*synthesized*/ fun values(): kotlin.Array + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + INSTANCE_INITIALIZER_CALL classDescriptor='TestEnumClass' + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): TestEnumClass + FUN public final fun valueOf(value: kotlin.String): TestEnumClass SYNTHETIC_BODY kind=ENUM_VALUEOF diff --git a/compiler/testData/ir/irText/classes/companionObject.txt b/compiler/testData/ir/irText/classes/companionObject.txt index 5591b2a89bc..7207fb78546 100644 --- a/compiler/testData/ir/irText/classes/companionObject.txt +++ b/compiler/testData/ir/irText/classes/companionObject.txt @@ -2,20 +2,20 @@ FILE /companionObject.kt CLASS CLASS Test1 CONSTRUCTOR public constructor Test1() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 - CLASS OBJECT Companion + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' + CLASS OBJECT companion object of Test1 CONSTRUCTOR private constructor Companion() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Companion + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Test1' CLASS CLASS Test2 CONSTRUCTOR public constructor Test2() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test2 - CLASS OBJECT Named + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' + CLASS OBJECT companion object of Test2Named CONSTRUCTOR private constructor Named() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Named + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Test2Named' diff --git a/compiler/testData/ir/irText/classes/dataClasses.txt b/compiler/testData/ir/irText/classes/dataClasses.txt index d29d025aea8..4b9ecdb84da 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.txt @@ -1,134 +1,134 @@ FILE /dataClasses.kt CLASS CLASS Test1 - CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.String, /*2*/ z: kotlin.Any) + CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.String, z: kotlin.Any) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final data class Test1 type=Test1 - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final data class Test1 type=Test1 - value: GET_VAR y type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD z type=kotlin.Unit operator=null - receiver: THIS public final data class Test1 type=Test1 - value: GET_VAR z type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test1' type=Test1 + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'y: String' type=kotlin.Unit operator=null + receiver: THIS of 'Test1' type=Test1 + value: GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'z: Any' type=kotlin.Unit operator=null + receiver: THIS of 'Test1' type=Test1 + value: GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val y: kotlin.String EXPRESSION_BODY - GET_VAR y type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: String' type=kotlin.String operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val z: kotlin.Any EXPRESSION_BODY - GET_VAR z type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN public final operator /*synthesized*/ fun component1(): kotlin.Int + GET_VAR 'value-parameter z: Any' type=kotlin.Any operator=INITIALIZE_PROPERTY_FROM_PARAMETER + FUN public final operator fun component1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=component1 - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - FUN public final operator /*synthesized*/ fun component2(): kotlin.String + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=component2 - CALL . type=kotlin.String operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - FUN public final operator /*synthesized*/ fun component3(): kotlin.Any + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=component3 - CALL . type=kotlin.Any operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - FUN public final /*synthesized*/ fun copy(/*0*/ x: kotlin.Int = ..., /*1*/ y: kotlin.String = ..., /*2*/ z: kotlin.Any = ...): Test1 + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=copy - CALL . type=Test1 operator=null - x: GET_VAR x type=kotlin.Int operator=null - y: GET_VAR y type=kotlin.String operator=null - z: GET_VAR z type=kotlin.Any operator=null - FUN public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=toString + RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String CONST String type=kotlin.String value='Test1(' CONST String type=kotlin.String value='x=' - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 CONST String type=kotlin.String value=', ' CONST String type=kotlin.String value='y=' - CALL . type=kotlin.String operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 + CALL '(): String' type=kotlin.String operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 CONST String type=kotlin.String value=', ' CONST String type=kotlin.String value='z=' - CALL . type=kotlin.Any operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 + CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 CONST String type=kotlin.String value=')' - FUN public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + FUN public open override fun hashCode(): kotlin.Int BLOCK_BODY VAR val tmp0_result: kotlin.Int CONST Int type=kotlin.Int value='0' - SET_VAR tmp0_result type=kotlin.Unit operator=EQ - CALL .hashCode type=kotlin.Int operator=null - $this: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - SET_VAR tmp0_result type=kotlin.Unit operator=EQ - CALL .plus type=kotlin.Int operator=null - $this: CALL .times type=kotlin.Int operator=null - $this: GET_VAR tmp0_result type=kotlin.Int operator=null + SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ + CALL 'hashCode(): Int' type=kotlin.Int operator=null + $this: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 + SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ + CALL 'plus(Int): Int' type=kotlin.Int operator=null + $this: CALL 'times(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='31' - other: CALL .hashCode type=kotlin.Int operator=null - $this: CALL . type=kotlin.String operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - SET_VAR tmp0_result type=kotlin.Unit operator=EQ - CALL .plus type=kotlin.Int operator=null - $this: CALL .times type=kotlin.Int operator=null - $this: GET_VAR tmp0_result type=kotlin.Int operator=null + other: CALL 'hashCode(): Int' type=kotlin.Int operator=null + $this: CALL '(): String' type=kotlin.String operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 + SET_VAR 'tmp0_result: Int' type=kotlin.Unit operator=EQ + CALL 'plus(Int): Int' type=kotlin.Int operator=null + $this: CALL 'times(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'tmp0_result: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='31' - other: CALL .hashCode type=kotlin.Int operator=null - $this: CALL . type=kotlin.Any operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - RETURN type=kotlin.Nothing from=hashCode - GET_VAR tmp0_result type=kotlin.Int operator=null - FUN public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + other: CALL 'hashCode(): Int' type=kotlin.Int operator=null + $this: CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY + $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 BLOCK_BODY WHEN type=kotlin.Unit operator=null - if: CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ - arg0: THIS public final data class Test1 type=Test1 - arg1: GET_VAR other type=kotlin.Any? operator=null - then: RETURN type=kotlin.Nothing from=equals + if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQEQ + arg0: THIS of 'Test1' type=Test1 + arg1: 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='true' WHEN type=kotlin.Unit operator=null if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=Test1 - GET_VAR other type=kotlin.Any? operator=null - then: RETURN type=kotlin.Nothing from=equals + 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 TYPE_OP operator=CAST typeOperand=Test1 - GET_VAR other type=kotlin.Any? operator=null + GET_VAR 'value-parameter other: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Unit operator=null - if: CALL .NOT type=kotlin.Boolean operator=EXCLEQ - arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ - arg0: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - arg1: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR tmp0_other_with_cast type=Test1 operator=null - then: RETURN type=kotlin.Nothing from=equals + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 + arg1: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' WHEN type=kotlin.Unit operator=null - if: CALL .NOT type=kotlin.Boolean operator=EXCLEQ - arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ - arg0: CALL . type=kotlin.String operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - arg1: CALL . type=kotlin.String operator=GET_PROPERTY - $this: GET_VAR tmp0_other_with_cast type=Test1 operator=null - then: RETURN type=kotlin.Nothing from=equals + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL '(): String' type=kotlin.String operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 + arg1: CALL '(): String' type=kotlin.String operator=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' WHEN type=kotlin.Unit operator=null - if: CALL .NOT type=kotlin.Boolean operator=EXCLEQ - arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ - arg0: CALL . type=kotlin.Any operator=GET_PROPERTY - $this: THIS public final data class Test1 type=Test1 - arg1: CALL . type=kotlin.Any operator=GET_PROPERTY - $this: GET_VAR tmp0_other_with_cast type=Test1 operator=null - then: RETURN type=kotlin.Nothing from=equals + if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY + $this: THIS of 'Test1' type=Test1 + arg1: CALL '(): Any' type=kotlin.Any operator=GET_PROPERTY + $this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 operator=null + then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' - RETURN type=kotlin.Nothing from=equals + RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='true' diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.txt index 3542172e15d..e35ebbc166b 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.txt @@ -1,141 +1,141 @@ FILE /delegatedImplementation.kt CLASS INTERFACE IBase - FUN public abstract fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit + FUN public abstract fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit FUN public abstract fun bar(): kotlin.Int FUN public abstract fun kotlin.String.qux(): kotlin.Unit CLASS OBJECT BaseImpl CONSTRUCTOR private constructor BaseImpl() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=BaseImpl - FUN public open override /*1*/ fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='BaseImpl' + FUN public open override fun foo(x: kotlin.Int, s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public open override /*1*/ fun bar(): kotlin.Int + FUN public open override fun bar(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=bar + RETURN type=kotlin.Nothing from='bar(): Int' CONST Int type=kotlin.Int value='42' - FUN public open override /*1*/ fun kotlin.String.qux(): kotlin.Unit + FUN public open override fun kotlin.String.qux(): kotlin.Unit BLOCK_BODY CLASS INTERFACE IOther PROPERTY public abstract val x: kotlin.String PROPERTY public abstract var y: kotlin.Int PROPERTY public abstract val kotlin.Byte.z1: kotlin.Int PROPERTY public abstract var kotlin.Byte.z2: kotlin.Int - FUN public fun otherImpl(/*0*/ x0: kotlin.String, /*1*/ y0: kotlin.Int): IOther + FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther BLOCK_BODY - RETURN type=kotlin.Nothing from=otherImpl + RETURN type=kotlin.Nothing from='otherImpl(String, Int): IOther' BLOCK type=otherImpl. operator=OBJECT_LITERAL CLASS CLASS CONSTRUCTOR public constructor () BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor= - PROPERTY public open override /*1*/ val x: kotlin.String + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='' + PROPERTY public open override val x: kotlin.String EXPRESSION_BODY - GET_VAR x0 type=kotlin.String operator=null - PROPERTY public open override /*1*/ var y: kotlin.Int + GET_VAR 'value-parameter x0: String' type=kotlin.String operator=null + PROPERTY public open override var y: kotlin.Int EXPRESSION_BODY - GET_VAR y0 type=kotlin.Int operator=null - PROPERTY public open override /*1*/ val kotlin.Byte.z1: kotlin.Int - PROPERTY_GETTER public open override /*1*/ fun kotlin.Byte.(): kotlin.Int + GET_VAR 'value-parameter y0: Int' type=kotlin.Int operator=null + PROPERTY public open override val kotlin.Byte.z1: kotlin.Int + PROPERTY_GETTER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='() on Byte: Int' CONST Int type=kotlin.Int value='1' - PROPERTY public open override /*1*/ var kotlin.Byte.z2: kotlin.Int - PROPERTY_GETTER public open override /*1*/ fun kotlin.Byte.(): kotlin.Int + PROPERTY public open override var kotlin.Byte.z2: kotlin.Int + PROPERTY_GETTER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='() on Byte: Int' CONST Int type=kotlin.Int value='2' - PROPERTY_SETTER public open override /*1*/ fun kotlin.Byte.(/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public open override fun kotlin.Byte.(value: kotlin.Int): kotlin.Unit BLOCK_BODY - CALL . type=otherImpl. operator=OBJECT_LITERAL + CALL 'constructor ()' type=otherImpl. operator=OBJECT_LITERAL CLASS CLASS Test1 CONSTRUCTOR public constructor Test1() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY val `Test1$IBase$delegate`: BaseImpl EXPRESSION_BODY - GET_OBJECT BaseImpl type=BaseImpl - FUN public open override /*1*/ /*delegation*/ fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit + GET_OBJECT 'BaseImpl' type=BaseImpl + FUN public open override fun bar(): kotlin.Int BLOCK_BODY - CALL .foo type=kotlin.Unit operator=null - $this: GET_VAR Test1$IBase$delegate type=BaseImpl operator=null - x: GET_VAR x type=kotlin.Int operator=null - s: GET_VAR s type=kotlin.String operator=null - FUN public open override /*1*/ /*delegation*/ fun bar(): kotlin.Int + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=bar - CALL .bar type=kotlin.Int operator=null - $this: GET_VAR Test1$IBase$delegate type=BaseImpl operator=null - FUN public open override /*1*/ /*delegation*/ fun kotlin.String.qux(): kotlin.Unit + 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 BLOCK_BODY - CALL .qux type=kotlin.Unit operator=null - $this: GET_VAR Test1$IBase$delegate type=BaseImpl operator=null - $receiver: $RECEIVER of: qux type=kotlin.String + CALL 'qux() on String: Unit' type=kotlin.Unit operator=null + $this: GET_VAR '`Test1$IBase$delegate`: BaseImpl' type=BaseImpl operator=null + $receiver: $RECEIVER of 'qux() on String: Unit' type=kotlin.String CLASS CLASS Test2 CONSTRUCTOR public constructor Test2() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test2 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY val `Test2$IBase$delegate`: BaseImpl EXPRESSION_BODY - GET_OBJECT BaseImpl type=BaseImpl - FUN public open override /*1*/ /*delegation*/ fun foo(/*0*/ x: kotlin.Int, /*1*/ s: kotlin.String): kotlin.Unit + GET_OBJECT 'BaseImpl' type=BaseImpl + FUN public open override fun bar(): kotlin.Int BLOCK_BODY - CALL .foo type=kotlin.Unit operator=null - $this: GET_VAR Test2$IBase$delegate type=BaseImpl operator=null - x: GET_VAR x type=kotlin.Int operator=null - s: GET_VAR s type=kotlin.String operator=null - FUN public open override /*1*/ /*delegation*/ fun bar(): kotlin.Int + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from=bar - CALL .bar type=kotlin.Int operator=null - $this: GET_VAR Test2$IBase$delegate type=BaseImpl operator=null - FUN public open override /*1*/ /*delegation*/ fun kotlin.String.qux(): kotlin.Unit + 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 BLOCK_BODY - CALL .qux type=kotlin.Unit operator=null - $this: GET_VAR Test2$IBase$delegate type=BaseImpl operator=null - $receiver: $RECEIVER of: qux type=kotlin.String + 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 PROPERTY val `Test2$IOther$delegate`: IOther EXPRESSION_BODY - CALL .otherImpl type=IOther operator=null + 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 /*1*/ /*delegation*/ val x: kotlin.String - PROPERTY_GETTER public open override /*1*/ /*delegation*/ fun (): kotlin.String + PROPERTY public open override val kotlin.Byte.z1: kotlin.Int + PROPERTY_GETTER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.String operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - PROPERTY public open override /*1*/ /*delegation*/ var y: kotlin.Int - PROPERTY_GETTER public open override /*1*/ /*delegation*/ fun (): kotlin.Int + 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 + PROPERTY_GETTER public open override fun (): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.Int operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - PROPERTY_SETTER public open override /*1*/ /*delegation*/ fun (/*0*/ : kotlin.Int): kotlin.Unit + 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 + PROPERTY_GETTER public open override fun kotlin.Byte.(): kotlin.Int BLOCK_BODY - CALL . type=kotlin.Unit operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - : GET_VAR type=kotlin.Int operator=null - PROPERTY public open override /*1*/ /*delegation*/ val kotlin.Byte.z1: kotlin.Int - PROPERTY_GETTER public open override /*1*/ /*delegation*/ fun kotlin.Byte.(): kotlin.Int + 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 + PROPERTY_SETTER public open override fun kotlin.Byte.(: kotlin.Int): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.Int operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - $receiver: $RECEIVER of: z1 type=kotlin.Byte - PROPERTY public open override /*1*/ /*delegation*/ var kotlin.Byte.z2: kotlin.Int - PROPERTY_GETTER public open override /*1*/ /*delegation*/ fun kotlin.Byte.(): kotlin.Int + 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 + PROPERTY_GETTER public open override fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.Int operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - $receiver: $RECEIVER of: z2 type=kotlin.Byte - PROPERTY_SETTER public open override /*1*/ /*delegation*/ fun kotlin.Byte.(/*0*/ : kotlin.Int): kotlin.Unit + RETURN type=kotlin.Nothing from='(): Int' + CALL '(): Int' type=kotlin.Int operator=null + $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null + PROPERTY_SETTER public open override fun (: kotlin.Int): kotlin.Unit BLOCK_BODY - CALL . type=kotlin.Unit operator=null - $this: GET_VAR Test2$IOther$delegate type=IOther operator=null - $receiver: $RECEIVER of: z2 type=kotlin.Byte - : GET_VAR type=kotlin.Int operator=null + CALL '(Int): Unit' type=kotlin.Unit operator=null + $this: GET_VAR '`Test2$IOther$delegate`: IOther' type=IOther operator=null + : GET_VAR 'value-parameter : Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt index c742f0d7ae7..673d0e9a105 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementationWithExplicitOverride.txt @@ -5,23 +5,23 @@ FILE /delegatedImplementationWithExplicitOverride.kt CLASS OBJECT FooBarImpl CONSTRUCTOR private constructor FooBarImpl() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=FooBarImpl - FUN public open override /*1*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='FooBarImpl' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - FUN public open override /*1*/ fun bar(): kotlin.Unit + FUN public open override fun bar(): kotlin.Unit BLOCK_BODY CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY val `C$IFooBar$delegate`: FooBarImpl EXPRESSION_BODY - GET_OBJECT FooBarImpl type=FooBarImpl - FUN public open override /*1*/ /*delegation*/ fun foo(): kotlin.Unit + GET_OBJECT 'FooBarImpl' type=FooBarImpl + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .foo type=kotlin.Unit operator=null - $this: GET_VAR C$IFooBar$delegate type=FooBarImpl operator=null - FUN public open override /*1*/ fun bar(): kotlin.Unit + CALL 'foo(): Unit' type=kotlin.Unit operator=null + $this: GET_VAR '`C$IFooBar$delegate`: FooBarImpl' type=FooBarImpl operator=null + FUN public open override fun bar(): kotlin.Unit BLOCK_BODY diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt index 364c094f76b..696f8d72a14 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallsInSecondaryConstructors.txt @@ -2,17 +2,17 @@ FILE /delegatingConstructorCallsInSecondaryConstructors.kt CLASS CLASS Base CONSTRUCTOR public constructor Base() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Base' CLASS CLASS Test CONSTRUCTOR public constructor Test() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Test - CONSTRUCTOR public constructor Test(/*0*/ xx: kotlin.Int) + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test' + CONSTRUCTOR public constructor Test(xx: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Test - CONSTRUCTOR public constructor Test(/*0*/ xx: kotlin.Short) + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test' + CONSTRUCTOR public constructor Test(xx: kotlin.Short) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Test + DELEGATING_CONSTRUCTOR_CALL 'constructor Test()' diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index cc95dee6d4b..d9dc95b27eb 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -2,105 +2,105 @@ FILE /enum.kt CLASS ENUM_CLASS TestEnum1 CONSTRUCTOR private constructor TestEnum1() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - INSTANCE_INITIALIZER_CALL classDescriptor=TestEnum1 + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum1' ENUM_ENTRY enum entry TEST1 - init: ENUM_CONSTRUCTOR_CALL TestEnum1 TEST1 + init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' TEST1 ENUM_ENTRY enum entry TEST2 - init: ENUM_CONSTRUCTOR_CALL TestEnum1 TEST2 - FUN public final /*synthesized*/ fun values(): kotlin.Array + init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum1()' TEST2 + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): TestEnum1 + FUN public final fun valueOf(value: kotlin.String): TestEnum1 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum2 - CONSTRUCTOR private constructor TestEnum2(/*0*/ x: kotlin.Int) + CONSTRUCTOR private constructor TestEnum2(x: kotlin.Int) BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final enum class TestEnum2 : kotlin.Enum type=TestEnum2 - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=TestEnum2 + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestEnum2' type=TestEnum2 + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum2' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER ENUM_ENTRY enum entry TEST1 - init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST1 + init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST1 x: CONST Int type=kotlin.Int value='1' ENUM_ENTRY enum entry TEST2 - init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST2 + init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST2 x: CONST Int type=kotlin.Int value='2' ENUM_ENTRY enum entry TEST3 - init: ENUM_CONSTRUCTOR_CALL TestEnum2 TEST3 + init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum2(Int)' TEST3 x: CONST Int type=kotlin.Int value='3' - FUN public final /*synthesized*/ fun values(): kotlin.Array + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): TestEnum2 + FUN public final fun valueOf(value: kotlin.String): TestEnum2 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum3 CONSTRUCTOR private constructor TestEnum3() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - INSTANCE_INITIALIZER_CALL classDescriptor=TestEnum3 + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum3' ENUM_ENTRY enum entry TEST - init: ENUM_CONSTRUCTOR_CALL TEST TEST + init: ENUM_CONSTRUCTOR_CALL 'constructor TEST()' TEST class: CLASS ENUM_ENTRY TEST CONSTRUCTOR private constructor TEST() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL TestEnum3 super - INSTANCE_INITIALIZER_CALL classDescriptor=TEST - FUN public open override /*1*/ fun foo(): kotlin.Unit + ENUM_CONSTRUCTOR_CALL 'constructor TestEnum3()' super + INSTANCE_INITIALIZER_CALL classDescriptor='TEST' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + 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 /*synthesized*/ fun values(): kotlin.Array + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): TestEnum3 + FUN public final fun valueOf(value: kotlin.String): TestEnum3 SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS ENUM_CLASS TestEnum4 - CONSTRUCTOR private constructor TestEnum4(/*0*/ x: kotlin.Int) + CONSTRUCTOR private constructor TestEnum4(x: kotlin.Int) BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final enum class TestEnum4 : kotlin.Enum type=TestEnum4 - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=TestEnum4 + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestEnum4' type=TestEnum4 + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='TestEnum4' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER ENUM_ENTRY enum entry TEST1 - init: ENUM_CONSTRUCTOR_CALL TEST1 TEST1 + init: ENUM_CONSTRUCTOR_CALL 'constructor TEST1()' TEST1 class: CLASS ENUM_ENTRY TEST1 CONSTRUCTOR private constructor TEST1() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL TestEnum4 super + ENUM_CONSTRUCTOR_CALL 'constructor TestEnum4(Int)' super x: CONST Int type=kotlin.Int value='1' - INSTANCE_INITIALIZER_CALL classDescriptor=TEST1 - FUN public open override /*1*/ fun foo(): kotlin.Unit + INSTANCE_INITIALIZER_CALL classDescriptor='TEST1' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null - message: GET_ENUM_VALUE TEST1 type=TestEnum4 + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null + message: GET_ENUM_VALUE 'TEST1' type=TestEnum4 ENUM_ENTRY enum entry TEST2 - init: ENUM_CONSTRUCTOR_CALL TEST2 TEST2 + init: ENUM_CONSTRUCTOR_CALL 'constructor TEST2()' TEST2 class: CLASS ENUM_ENTRY TEST2 CONSTRUCTOR private constructor TEST2() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL TestEnum4 super + ENUM_CONSTRUCTOR_CALL 'constructor TestEnum4(Int)' super x: CONST Int type=kotlin.Int value='2' - INSTANCE_INITIALIZER_CALL classDescriptor=TEST2 + INSTANCE_INITIALIZER_CALL classDescriptor='TEST2' PROPERTY public final val z: kotlin.Int ANONYMOUS_INITIALIZER TEST2 BLOCK_BODY - SET_BACKING_FIELD z type=kotlin.Unit operator=null - receiver: THIS enum entry TEST2 type=TestEnum4.TEST2 - value: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS enum entry TEST2 type=TestEnum4.TEST2 - FUN public open override /*1*/ fun foo(): kotlin.Unit + SET_BACKING_FIELD 'z: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TEST2' type=TestEnum4.TEST2 + value: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'TEST2' type=TestEnum4.TEST2 + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null - message: GET_ENUM_VALUE TEST2 type=TestEnum4 + 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 /*synthesized*/ fun values(): kotlin.Array + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): TestEnum4 + FUN 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 3160f8bd7bf..272e945d529 100644 --- a/compiler/testData/ir/irText/classes/initBlock.txt +++ b/compiler/testData/ir/irText/classes/initBlock.txt @@ -2,61 +2,61 @@ FILE /initBlock.kt CLASS CLASS Test1 CONSTRUCTOR public constructor Test1() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' ANONYMOUS_INITIALIZER Test1 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null CLASS CLASS Test2 - CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int) + CONSTRUCTOR public constructor Test2(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class Test2 type=Test2 - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Test2 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test2' type=Test2 + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER ANONYMOUS_INITIALIZER Test2 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null CLASS CLASS Test3 ANONYMOUS_INITIALIZER Test3 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null CONSTRUCTOR public constructor Test3() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test3 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test3' CLASS CLASS Test4 ANONYMOUS_INITIALIZER Test4 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='1' CONSTRUCTOR public constructor Test4() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test4 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test4' ANONYMOUS_INITIALIZER Test4 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='2' CLASS CLASS Test5 CONSTRUCTOR public constructor Test5() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Test5 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test5' ANONYMOUS_INITIALIZER Test5 BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='1' CLASS CLASS TestInner CONSTRUCTOR public constructor TestInner() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInner + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInner' ANONYMOUS_INITIALIZER TestInner BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='2' diff --git a/compiler/testData/ir/irText/classes/initVal.txt b/compiler/testData/ir/irText/classes/initVal.txt index 04bd89eda99..d467ad626c8 100644 --- a/compiler/testData/ir/irText/classes/initVal.txt +++ b/compiler/testData/ir/irText/classes/initVal.txt @@ -1,31 +1,31 @@ FILE /initVal.kt CLASS CLASS TestInitValFromParameter - CONSTRUCTOR public constructor TestInitValFromParameter(/*0*/ x: kotlin.Int) + CONSTRUCTOR public constructor TestInitValFromParameter(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class TestInitValFromParameter type=TestInitValFromParameter - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValFromParameter + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestInitValFromParameter' type=TestInitValFromParameter + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValFromParameter' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS CLASS TestInitValInClass CONSTRUCTOR public constructor TestInitValInClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInClass' PROPERTY public final val x: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CLASS CLASS TestInitValInInitBlock CONSTRUCTOR public constructor TestInitValInInitBlock() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitValInInitBlock + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitValInInitBlock' PROPERTY public final val x: kotlin.Int ANONYMOUS_INITIALIZER TestInitValInInitBlock BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class TestInitValInInitBlock type=TestInitValInInitBlock + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestInitValInInitBlock' type=TestInitValInInitBlock value: CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/classes/initVar.txt b/compiler/testData/ir/irText/classes/initVar.txt index 6742c692852..28ed719ef56 100644 --- a/compiler/testData/ir/irText/classes/initVar.txt +++ b/compiler/testData/ir/irText/classes/initVar.txt @@ -1,71 +1,71 @@ FILE /initVar.kt CLASS CLASS TestInitVarFromParameter - CONSTRUCTOR public constructor TestInitVarFromParameter(/*0*/ x: kotlin.Int) + CONSTRUCTOR public constructor TestInitVarFromParameter(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class TestInitVarFromParameter type=TestInitVarFromParameter - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarFromParameter + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestInitVarFromParameter' type=TestInitVarFromParameter + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarFromParameter' PROPERTY public final var x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS CLASS TestInitVarInClass CONSTRUCTOR public constructor TestInitVarInClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInClass' PROPERTY public final var x: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CLASS CLASS TestInitVarInInitBlock CONSTRUCTOR public constructor TestInitVarInInitBlock() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarInInitBlock + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarInInitBlock' PROPERTY public final var x: kotlin.Int ANONYMOUS_INITIALIZER TestInitVarInInitBlock BLOCK_BODY - CALL . type=kotlin.Unit operator=EQ - $this: THIS public final class TestInitVarInInitBlock type=TestInitVarInInitBlock + CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: THIS of 'TestInitVarInInitBlock' type=TestInitVarInInitBlock : CONST Int type=kotlin.Int value='0' CLASS CLASS TestInitVarWithCustomSetter CONSTRUCTOR public constructor TestInitVarWithCustomSetter() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetter + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetter' PROPERTY public final var x: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - PROPERTY_SETTER public final fun (/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public final fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=EQ - value: GET_VAR value type=kotlin.Int operator=null + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null CLASS CLASS TestInitVarWithCustomSetterWithExplicitCtor PROPERTY public final var x: kotlin.Int - PROPERTY_SETTER public final fun (/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public final fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=EQ - value: GET_VAR value type=kotlin.Int operator=null + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null ANONYMOUS_INITIALIZER TestInitVarWithCustomSetterWithExplicitCtor BLOCK_BODY - CALL . type=kotlin.Unit operator=EQ - $this: THIS public final class TestInitVarWithCustomSetterWithExplicitCtor type=TestInitVarWithCustomSetterWithExplicitCtor + CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: THIS of 'TestInitVarWithCustomSetterWithExplicitCtor' type=TestInitVarWithCustomSetterWithExplicitCtor value: CONST Int type=kotlin.Int value='0' CONSTRUCTOR public constructor TestInitVarWithCustomSetterWithExplicitCtor() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetterWithExplicitCtor + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterWithExplicitCtor' CLASS CLASS TestInitVarWithCustomSetterInCtor PROPERTY public final var x: kotlin.Int - PROPERTY_SETTER public final fun (/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public final fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=EQ - value: GET_VAR value type=kotlin.Int operator=null + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=EQ + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null CONSTRUCTOR public constructor TestInitVarWithCustomSetterInCtor() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitVarWithCustomSetterInCtor - CALL . type=kotlin.Unit operator=EQ - $this: THIS public final class TestInitVarWithCustomSetterInCtor type=TestInitVarWithCustomSetterInCtor + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitVarWithCustomSetterInCtor' + CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: THIS of 'TestInitVarWithCustomSetterInCtor' type=TestInitVarWithCustomSetterInCtor value: CONST Int type=kotlin.Int value='42' diff --git a/compiler/testData/ir/irText/classes/innerClass.txt b/compiler/testData/ir/irText/classes/innerClass.txt index bdd255c6d40..eb757652086 100644 --- a/compiler/testData/ir/irText/classes/innerClass.txt +++ b/compiler/testData/ir/irText/classes/innerClass.txt @@ -2,16 +2,16 @@ FILE /innerClass.kt CLASS CLASS Outer CONSTRUCTOR public constructor Outer() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Outer + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Outer' CLASS CLASS TestInnerClass CONSTRUCTOR public constructor TestInnerClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestInnerClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInnerClass' CLASS CLASS DerivedInnerClass CONSTRUCTOR public constructor DerivedInnerClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL TestInnerClass - $this: THIS public final class Outer type=Outer - INSTANCE_INITIALIZER_CALL classDescriptor=DerivedInnerClass + DELEGATING_CONSTRUCTOR_CALL 'constructor TestInnerClass()' + $this: THIS of 'Outer' type=Outer + INSTANCE_INITIALIZER_CALL classDescriptor='DerivedInnerClass' diff --git a/compiler/testData/ir/irText/classes/localClasses.txt b/compiler/testData/ir/irText/classes/localClasses.txt index 8c366d3a938..063292764ee 100644 --- a/compiler/testData/ir/irText/classes/localClasses.txt +++ b/compiler/testData/ir/irText/classes/localClasses.txt @@ -4,9 +4,9 @@ FILE /localClasses.kt CLASS CLASS LocalClass CONSTRUCTOR public constructor LocalClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=LocalClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='LocalClass' FUN public final fun foo(): kotlin.Unit BLOCK_BODY - CALL .foo type=kotlin.Unit operator=null - $this: CALL . type=outer.LocalClass operator=null + CALL 'foo(): Unit' type=kotlin.Unit operator=null + $this: CALL 'constructor LocalClass()' type=outer.LocalClass operator=null diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt index 059829aad73..939948c6b1b 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt @@ -7,59 +7,59 @@ FILE /objectLiteralExpressions.kt CLASS CLASS CONSTRUCTOR public constructor () BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor= - CALL . type=test1. operator=OBJECT_LITERAL + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='' + CALL 'constructor ()' type=test1. operator=OBJECT_LITERAL PROPERTY public val test2: IFoo EXPRESSION_BODY BLOCK type=test2. operator=OBJECT_LITERAL CLASS CLASS CONSTRUCTOR public constructor () BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor= - FUN public open override /*1*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='foo' - CALL . type=test2. operator=OBJECT_LITERAL + CALL 'constructor ()' type=test2. operator=OBJECT_LITERAL CLASS CLASS Outer CONSTRUCTOR public constructor Outer() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Outer + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Outer' CLASS CLASS Inner CONSTRUCTOR public constructor Inner() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Inner + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Inner' FUN public final fun test3(): Outer.Inner BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 + RETURN type=kotlin.Nothing from='test3(): Outer.Inner' BLOCK type=Outer.test3. operator=OBJECT_LITERAL CLASS CLASS CONSTRUCTOR public constructor () BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Inner - $this: THIS public final class Outer type=Outer - INSTANCE_INITIALIZER_CALL classDescriptor= - FUN public open override /*1*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Inner()' + $this: THIS of 'Outer' type=Outer + INSTANCE_INITIALIZER_CALL classDescriptor='' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='foo' - CALL . type=Outer.test3. operator=OBJECT_LITERAL + CALL 'constructor ()' type=Outer.test3. operator=OBJECT_LITERAL FUN public fun Outer.test4(): Outer.Inner BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 + RETURN type=kotlin.Nothing from='test4() on Outer: Outer.Inner' BLOCK type=test4. operator=OBJECT_LITERAL CLASS CLASS CONSTRUCTOR public constructor () BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Inner - $this: $RECEIVER of: test4 type=Outer - INSTANCE_INITIALIZER_CALL classDescriptor= - FUN public open override /*1*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Inner()' + $this: $RECEIVER of 'test4() on Outer: Outer.Inner' type=Outer + INSTANCE_INITIALIZER_CALL classDescriptor='' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='foo' - CALL . type=test4. operator=OBJECT_LITERAL + CALL 'constructor ()' type=test4. operator=OBJECT_LITERAL diff --git a/compiler/testData/ir/irText/classes/objectWithInitializers.txt b/compiler/testData/ir/irText/classes/objectWithInitializers.txt index bdb687fb8f6..ce8e2233f07 100644 --- a/compiler/testData/ir/irText/classes/objectWithInitializers.txt +++ b/compiler/testData/ir/irText/classes/objectWithInitializers.txt @@ -2,20 +2,20 @@ FILE /objectWithInitializers.kt CLASS CLASS Base CONSTRUCTOR public constructor Base() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Base' CLASS OBJECT Test CONSTRUCTOR private constructor Test() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Test + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Test' PROPERTY public final val x: kotlin.Int = 1 EXPRESSION_BODY CONST Int type=kotlin.Int value='1' PROPERTY public final val y: kotlin.Int ANONYMOUS_INITIALIZER Test BLOCK_BODY - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public object Test : Base type=Test - value: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: THIS public object Test : Base type=Test + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test' type=Test + value: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'Test' type=Test diff --git a/compiler/testData/ir/irText/classes/primaryConstructor.txt b/compiler/testData/ir/irText/classes/primaryConstructor.txt index 04580cf0013..c79d1cc7145 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructor.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructor.txt @@ -1,49 +1,49 @@ FILE /primaryConstructor.kt CLASS CLASS Test1 - CONSTRUCTOR public constructor Test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) + CONSTRUCTOR public constructor Test1(x: kotlin.Int, y: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class Test1 type=Test1 - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final class Test1 type=Test1 - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Test1 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test1' type=Test1 + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test1' type=Test1 + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Test1' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS CLASS Test2 - CONSTRUCTOR public constructor Test2(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) + CONSTRUCTOR public constructor Test2(x: kotlin.Int, y: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final class Test2 type=Test2 - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Test2 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test2' type=Test2 + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Test2' PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=null + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null CLASS CLASS Test3 - CONSTRUCTOR public constructor Test3(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) + CONSTRUCTOR public constructor Test3(x: kotlin.Int, y: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final class Test3 type=Test3 - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Test3 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test3' type=Test3 + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Test3' PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val x: kotlin.Int ANONYMOUS_INITIALIZER Test3 BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class Test3 type=Test3 - value: GET_VAR x type=kotlin.Int operator=null + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Test3' type=Test3 + value: GET_VAR 'value-parameter 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 926a58cd624..af9ec183b6b 100644 --- a/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt +++ b/compiler/testData/ir/irText/classes/primaryConstructorWithSuperConstructorCall.txt @@ -2,37 +2,37 @@ FILE /primaryConstructorWithSuperConstructorCall.kt CLASS CLASS Base CONSTRUCTOR public constructor Base() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Base' CLASS CLASS TestImplicitPrimaryConstructor CONSTRUCTOR public constructor TestImplicitPrimaryConstructor() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=TestImplicitPrimaryConstructor + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestImplicitPrimaryConstructor' CLASS CLASS TestExplicitPrimaryConstructor CONSTRUCTOR public constructor TestExplicitPrimaryConstructor() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=TestExplicitPrimaryConstructor + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestExplicitPrimaryConstructor' CLASS CLASS TestWithDelegatingConstructor - CONSTRUCTOR public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int) + CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int, y: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class TestWithDelegatingConstructor : Base type=TestWithDelegatingConstructor - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD y type=kotlin.Unit operator=null - receiver: THIS public final class TestWithDelegatingConstructor : Base type=TestWithDelegatingConstructor - value: GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=TestWithDelegatingConstructor + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'y: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestWithDelegatingConstructor' type=TestWithDelegatingConstructor + value: GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='TestWithDelegatingConstructor' PROPERTY public final val x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val y: kotlin.Int EXPRESSION_BODY - GET_VAR y type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - CONSTRUCTOR public constructor TestWithDelegatingConstructor(/*0*/ x: kotlin.Int) + GET_VAR 'value-parameter y: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + CONSTRUCTOR public constructor TestWithDelegatingConstructor(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL TestWithDelegatingConstructor - x: GET_VAR x type=kotlin.Int operator=null + DELEGATING_CONSTRUCTOR_CALL 'constructor TestWithDelegatingConstructor(Int, Int)' + x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt b/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt index 3c1e5a298a3..68f40afd693 100644 --- a/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt +++ b/compiler/testData/ir/irText/classes/qualifiedSuperCalls.txt @@ -5,7 +5,7 @@ FILE /qualifiedSuperCalls.kt PROPERTY public open val bar: kotlin.Int PROPERTY_GETTER public open fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='1' CLASS INTERFACE IRight FUN public open fun foo(): kotlin.Unit @@ -13,25 +13,25 @@ FILE /qualifiedSuperCalls.kt PROPERTY public open val bar: kotlin.Int PROPERTY_GETTER public open fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='2' CLASS CLASS CBoth CONSTRUCTOR public constructor CBoth() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=CBoth - FUN public open override /*2*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='CBoth' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .foo superQualifier=ILeft type=kotlin.Unit operator=null - $this: THIS public final class CBoth : ILeft, IRight type=ILeft - CALL .foo superQualifier=IRight type=kotlin.Unit operator=null - $this: THIS public final class CBoth : ILeft, IRight type=IRight - PROPERTY public open override /*2*/ val bar: kotlin.Int - PROPERTY_GETTER public open override /*2*/ fun (): kotlin.Int + CALL 'foo(): Unit' superQualifier=ILeft type=kotlin.Unit operator=null + $this: THIS of 'CBoth' type=ILeft + CALL 'foo(): Unit' superQualifier=IRight type=kotlin.Unit operator=null + $this: THIS of 'CBoth' type=IRight + PROPERTY public open override val bar: kotlin.Int + PROPERTY_GETTER public open override fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .plus type=kotlin.Int operator=PLUS - $this: CALL . superQualifier=ILeft type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final class CBoth : ILeft, IRight type=ILeft - other: CALL . superQualifier=IRight type=kotlin.Int operator=GET_PROPERTY - $this: THIS public final class CBoth : ILeft, IRight type=IRight + RETURN type=kotlin.Nothing from='(): Int' + CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: CALL '(): Int' superQualifier=ILeft type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'CBoth' type=ILeft + other: CALL '(): Int' superQualifier=IRight type=kotlin.Int operator=GET_PROPERTY + $this: THIS of 'CBoth' type=IRight diff --git a/compiler/testData/ir/irText/classes/sealedClasses.txt b/compiler/testData/ir/irText/classes/sealedClasses.txt index 1b4285596d4..4726ccde2e8 100644 --- a/compiler/testData/ir/irText/classes/sealedClasses.txt +++ b/compiler/testData/ir/irText/classes/sealedClasses.txt @@ -2,38 +2,38 @@ FILE /sealedClasses.kt CLASS CLASS Expr CONSTRUCTOR private constructor Expr() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Expr + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Expr' CLASS CLASS Const - CONSTRUCTOR public constructor Const(/*0*/ number: kotlin.Double) + CONSTRUCTOR public constructor Const(number: kotlin.Double) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Expr - SET_BACKING_FIELD number type=kotlin.Unit operator=null - receiver: THIS public final class Const : Expr type=Expr.Const - value: GET_VAR number type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Const + DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' + SET_BACKING_FIELD 'number: Double' type=kotlin.Unit operator=null + receiver: THIS of 'Const' type=Expr.Const + value: GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Const' PROPERTY public final val number: kotlin.Double EXPRESSION_BODY - GET_VAR number type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter number: Double' type=kotlin.Double operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS CLASS Sum - CONSTRUCTOR public constructor Sum(/*0*/ e1: Expr, /*1*/ e2: Expr) + CONSTRUCTOR public constructor Sum(e1: Expr, e2: Expr) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Expr - SET_BACKING_FIELD e1 type=kotlin.Unit operator=null - receiver: THIS public final class Sum : Expr type=Expr.Sum - value: GET_VAR e1 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER - SET_BACKING_FIELD e2 type=kotlin.Unit operator=null - receiver: THIS public final class Sum : Expr type=Expr.Sum - value: GET_VAR e2 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Sum + DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' + SET_BACKING_FIELD 'e1: Expr' type=kotlin.Unit operator=null + receiver: THIS of 'Sum' type=Expr.Sum + value: GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER + SET_BACKING_FIELD 'e2: Expr' type=kotlin.Unit operator=null + receiver: THIS of 'Sum' type=Expr.Sum + value: GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Sum' PROPERTY public final val e1: Expr EXPRESSION_BODY - GET_VAR e1 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter e1: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val e2: Expr EXPRESSION_BODY - GET_VAR e2 type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter e2: Expr' type=Expr operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS OBJECT NotANumber CONSTRUCTOR private constructor NotANumber() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Expr - INSTANCE_INITIALIZER_CALL classDescriptor=NotANumber + DELEGATING_CONSTRUCTOR_CALL 'constructor Expr()' + INSTANCE_INITIALIZER_CALL classDescriptor='NotANumber' diff --git a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt index 94e36f3b8d6..c162d05585b 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructorWithInitializersFromClassBody.txt @@ -2,24 +2,24 @@ FILE /secondaryConstructorWithInitializersFromClassBody.kt CLASS CLASS Base CONSTRUCTOR public constructor Base() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Base' CLASS CLASS TestProperty PROPERTY public final val x: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CONSTRUCTOR public constructor TestProperty() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=TestProperty + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestProperty' CLASS CLASS TestInitBlock PROPERTY public final val x: kotlin.Int ANONYMOUS_INITIALIZER TestInitBlock BLOCK_BODY - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class TestInitBlock : Base type=TestInitBlock + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'TestInitBlock' type=TestInitBlock value: CONST Int type=kotlin.Int value='0' CONSTRUCTOR public constructor TestInitBlock() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=TestInitBlock + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestInitBlock' diff --git a/compiler/testData/ir/irText/classes/secondaryConstructors.txt b/compiler/testData/ir/irText/classes/secondaryConstructors.txt index 72c6480821f..48c4131d851 100644 --- a/compiler/testData/ir/irText/classes/secondaryConstructors.txt +++ b/compiler/testData/ir/irText/classes/secondaryConstructors.txt @@ -2,9 +2,9 @@ FILE /secondaryConstructors.kt CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL C + DELEGATING_CONSTRUCTOR_CALL 'constructor C(Int)' x: CONST Int type=kotlin.Int value='0' - CONSTRUCTOR public constructor C(/*0*/ x: kotlin.Int) + CONSTRUCTOR public constructor C(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='C' diff --git a/compiler/testData/ir/irText/classes/superCalls.txt b/compiler/testData/ir/irText/classes/superCalls.txt index 47a3a75b30c..cd6b62c3190 100644 --- a/compiler/testData/ir/irText/classes/superCalls.txt +++ b/compiler/testData/ir/irText/classes/superCalls.txt @@ -2,8 +2,8 @@ FILE /superCalls.kt CLASS CLASS Base CONSTRUCTOR public constructor Base() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Base + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Base' FUN public open fun foo(): kotlin.Unit BLOCK_BODY PROPERTY public open val bar: kotlin.String = "" @@ -12,15 +12,15 @@ FILE /superCalls.kt CLASS CLASS Derived CONSTRUCTOR public constructor Derived() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Derived - FUN public open override /*1*/ fun foo(): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Derived' + FUN public open override fun foo(): kotlin.Unit BLOCK_BODY - CALL .foo superQualifier=Base type=kotlin.Unit operator=null - $this: THIS public final class Derived : Base type=Base - PROPERTY public open override /*1*/ val bar: kotlin.String - PROPERTY_GETTER public open override /*1*/ fun (): kotlin.String + CALL 'foo(): Unit' superQualifier=Base type=kotlin.Unit operator=null + $this: THIS of 'Derived' type=Base + PROPERTY public open override val bar: kotlin.String + PROPERTY_GETTER public open override fun (): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . superQualifier=Base type=kotlin.String operator=GET_PROPERTY - $this: THIS public final class Derived : Base type=Base + RETURN type=kotlin.Nothing from='(): String' + CALL '(): String' superQualifier=Base type=kotlin.String operator=GET_PROPERTY + $this: THIS of 'Derived' type=Base diff --git a/compiler/testData/ir/irText/declarations/defaultArguments.txt b/compiler/testData/ir/irText/declarations/defaultArguments.txt index 4b6a48422ce..47272280e3a 100644 --- a/compiler/testData/ir/irText/declarations/defaultArguments.txt +++ b/compiler/testData/ir/irText/declarations/defaultArguments.txt @@ -1,5 +1,5 @@ FILE /defaultArguments.kt - FUN public fun test1(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int = ..., /*2*/ z: kotlin.String = ...): kotlin.Unit + FUN public fun test1(x: kotlin.Int, y: kotlin.Int = ..., z: kotlin.String = ...): kotlin.Unit y: EXPRESSION_BODY CONST Int type=kotlin.Int value='0' z: EXPRESSION_BODY diff --git a/compiler/testData/ir/irText/declarations/delegatedProperties.txt b/compiler/testData/ir/irText/declarations/delegatedProperties.txt index 8c8ddf1d0b1..e79e0c5138f 100644 --- a/compiler/testData/ir/irText/declarations/delegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/delegatedProperties.txt @@ -2,87 +2,87 @@ FILE /delegatedProperties.kt PROPERTY public val test1: kotlin.Int delegate: PROPERTY val `test1$delegate`: kotlin.Lazy EXPRESSION_BODY - CALL .lazy type=kotlin.Lazy operator=null + CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA FUN local final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA PROPERTY_GETTER public fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Int operator=null - $receiver: GET_BACKING_FIELD test1$delegate type=kotlin.Lazy operator=null + RETURN type=kotlin.Nothing from='(): Int' + CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null + $receiver: GET_BACKING_FIELD '`test1$delegate`: Lazy' type=kotlin.Lazy operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE test1 type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + property: CALLABLE_REFERENCE 'test1: Int' type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE CLASS CLASS C - CONSTRUCTOR public constructor C(/*0*/ map: kotlin.collections.MutableMap) + CONSTRUCTOR public constructor C(map: kotlin.collections.MutableMap) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD map type=kotlin.Unit operator=null - receiver: THIS public final class C type=C - value: GET_VAR map type=kotlin.collections.MutableMap operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'map: MutableMap' type=kotlin.Unit operator=null + receiver: THIS of 'C' type=C + value: GET_VAR 'value-parameter map: MutableMap' type=kotlin.collections.MutableMap operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val map: kotlin.collections.MutableMap EXPRESSION_BODY - GET_VAR map type=kotlin.collections.MutableMap operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter map: MutableMap' type=kotlin.collections.MutableMap operator=INITIALIZE_PROPERTY_FROM_PARAMETER PROPERTY public final val test2: kotlin.Int delegate: PROPERTY val `test2$delegate`: kotlin.Lazy EXPRESSION_BODY - CALL .lazy type=kotlin.Lazy operator=null + CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA FUN local final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA PROPERTY_GETTER public final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Int operator=null - $receiver: GET_BACKING_FIELD test2$delegate type=kotlin.Lazy operator=null - receiver: THIS public final class C type=C - thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE test2 type=kotlin.reflect.KProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE + RETURN type=kotlin.Nothing from='(): Int' + CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null + $receiver: GET_BACKING_FIELD '`test2$delegate`: Lazy' type=kotlin.Lazy operator=null + receiver: THIS of 'C' type=C + 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 delegate: PROPERTY val `test3$delegate`: kotlin.collections.MutableMap EXPRESSION_BODY - CALL . type=kotlin.collections.MutableMap operator=GET_PROPERTY - $this: THIS public final class C type=C + CALL '(): MutableMap' type=kotlin.collections.MutableMap operator=GET_PROPERTY + $this: THIS of 'C' type=C PROPERTY_GETTER public final fun (): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Any operator=null - $receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap operator=null - receiver: THIS public final class C type=C - thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE - PROPERTY_SETTER public final fun (/*0*/ : kotlin.Any): kotlin.Unit + RETURN type=kotlin.Nothing from='(): Any' + CALL 'getValue(Any?, KProperty<*>) on MutableMap: Any' type=kotlin.Any operator=null + $receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap' type=kotlin.collections.MutableMap operator=null + 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 + PROPERTY_SETTER public final fun (: kotlin.Any): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .setValue type=kotlin.Unit operator=null - $receiver: GET_BACKING_FIELD test3$delegate type=kotlin.collections.MutableMap operator=null - receiver: THIS public final class C type=C - thisRef: THIS public final class C type=C - property: CALLABLE_REFERENCE test3 type=kotlin.reflect.KMutableProperty1 operator=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR type=kotlin.Any operator=null + RETURN type=kotlin.Nothing from='(Any): Unit' + CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit operator=null + $receiver: GET_BACKING_FIELD '`test3$delegate`: MutableMap' type=kotlin.collections.MutableMap operator=null + 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 + value: GET_VAR 'value-parameter : Any' type=kotlin.Any operator=null PROPERTY public var test4: kotlin.Any delegate: PROPERTY val `test4$delegate`: java.util.HashMap EXPRESSION_BODY - CALL .hashMapOf type=java.util.HashMap operator=null + CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null PROPERTY_GETTER public fun (): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Any operator=null - $receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap operator=null + 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 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - PROPERTY_SETTER public fun (/*0*/ : kotlin.Any): kotlin.Unit + property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + PROPERTY_SETTER public fun (: kotlin.Any): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .setValue type=kotlin.Unit operator=null - $receiver: GET_BACKING_FIELD test4$delegate type=java.util.HashMap operator=null + RETURN type=kotlin.Nothing from='(Any): Unit' + CALL 'setValue(Any?, KProperty<*>, Any) on MutableMap: Unit' type=kotlin.Unit 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 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR type=kotlin.Any operator=null + property: CALLABLE_REFERENCE 'test4: Any' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR 'value-parameter : Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index 1bea713eace..6b61819ba75 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -3,53 +3,53 @@ FILE /localDelegatedProperties.kt BLOCK_BODY LOCAL_DELEGATED_PROPERTY val x: kotlin.Int VAR val `x$delegate`: kotlin.Lazy - CALL .lazy type=kotlin.Lazy operator=null + CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy operator=null initializer: BLOCK type=() -> kotlin.Int operator=LAMBDA FUN local final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA - LOCAL_PROPERTY_ACCESSOR + CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA + LOCAL_PROPERTY_ACCESSOR (): Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Int operator=null - $receiver: GET_VAR x$delegate type=kotlin.Lazy operator=null + RETURN type=kotlin.Nothing from='(): Int' + CALL 'getValue(Any?, KProperty<*>) on Lazy: Int' type=kotlin.Int operator=null + $receiver: GET_VAR '`x$delegate`: Lazy' type=kotlin.Lazy operator=null thisRef: CONST Null type=kotlin.Nothing? value='null' - property: CALLABLE_REFERENCE x type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - CALL .println type=kotlin.Unit operator=null - message: CALL . type=kotlin.Int operator=GET_LOCAL_PROPERTY + property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + CALL 'println(Int): Unit' type=kotlin.Unit operator=null + message: CALL '(): Int' type=kotlin.Int operator=GET_LOCAL_PROPERTY FUN public fun test2(): kotlin.Unit BLOCK_BODY LOCAL_DELEGATED_PROPERTY var x: kotlin.Int VAR val `x$delegate`: java.util.HashMap - CALL .hashMapOf type=java.util.HashMap operator=null - LOCAL_PROPERTY_ACCESSOR + CALL 'hashMapOf(vararg Pair): HashMap' type=java.util.HashMap operator=null + LOCAL_PROPERTY_ACCESSOR (): Int BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .getValue type=kotlin.Int operator=null - $receiver: GET_VAR x$delegate type=java.util.HashMap operator=null + 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 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - LOCAL_PROPERTY_ACCESSOR + property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + LOCAL_PROPERTY_ACCESSOR (Int): Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(Int): Int' TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int - CALL .setValue type=kotlin.Unit operator=null - $receiver: GET_VAR x$delegate type=java.util.HashMap operator=null + CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit 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 type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE - value: GET_VAR value type=kotlin.Int operator=null - CALL . type=kotlin.Int operator=EQ + property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0 operator=PROPERTY_REFERENCE_FOR_DELEGATE + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=null + 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 - CALL . type=kotlin.Int operator=POSTFIX_INCR - CALL . type=kotlin.Int operator=POSTFIX_INCR - value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null - CALL . type=kotlin.Int operator=PLUSEQ - value: CALL .plus type=kotlin.Int operator=PLUSEQ - $this: CALL . type=kotlin.Int operator=PLUSEQ + 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 + $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + CALL '(Int): Int' type=kotlin.Int operator=PLUSEQ + value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: CALL '(): Int' type=kotlin.Int operator=PLUSEQ other: CONST Int type=kotlin.Int value='1' diff --git a/compiler/testData/ir/irText/declarations/typeAlias.txt b/compiler/testData/ir/irText/declarations/typeAlias.txt index cbedaf77dd6..9bc114fd2e9 100644 --- a/compiler/testData/ir/irText/declarations/typeAlias.txt +++ b/compiler/testData/ir/irText/declarations/typeAlias.txt @@ -1,11 +1,11 @@ FILE /typeAlias.kt - TYPEALIAS Test1 type=kotlin.String + TYPEALIAS typealias Test1 = String type=kotlin.String FUN public fun foo(): kotlin.Unit BLOCK_BODY - TYPEALIAS TestLocal type=kotlin.String + TYPEALIAS typealias TestLocal = String type=kotlin.String CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=C - TYPEALIAS TestNested type=kotlin.String + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='C' + TYPEALIAS typealias TestNested = String type=kotlin.String diff --git a/compiler/testData/ir/irText/expressions/arrayAccess.txt b/compiler/testData/ir/irText/expressions/arrayAccess.txt index ccb879eece9..d7de498bd6e 100644 --- a/compiler/testData/ir/irText/expressions/arrayAccess.txt +++ b/compiler/testData/ir/irText/expressions/arrayAccess.txt @@ -4,19 +4,19 @@ FILE /arrayAccess.kt CONST Int type=kotlin.Int value='0' FUN public fun foo(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=foo + RETURN type=kotlin.Nothing from='foo(): Int' CONST Int type=kotlin.Int value='1' - FUN public fun test(/*0*/ a: kotlin.IntArray): kotlin.Int + FUN public fun test(a: kotlin.IntArray): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test - CALL .plus type=kotlin.Int operator=PLUS - $this: CALL .plus type=kotlin.Int operator=PLUS - $this: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT - $this: GET_VAR a type=kotlin.IntArray operator=null + RETURN type=kotlin.Nothing from='test(IntArray): Int' + CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT + $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null index: CONST Int type=kotlin.Int value='0' - other: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT - $this: GET_VAR a type=kotlin.IntArray operator=null - index: CALL . type=kotlin.Int operator=GET_PROPERTY - other: CALL .get type=kotlin.Int operator=GET_ARRAY_ELEMENT - $this: GET_VAR a type=kotlin.IntArray operator=null - index: CALL .foo type=kotlin.Int operator=null + other: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT + $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null + index: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + other: CALL 'get(Int): Int' type=kotlin.Int operator=GET_ARRAY_ELEMENT + $this: GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null + index: CALL 'foo(): Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/arrayAssignment.txt b/compiler/testData/ir/irText/expressions/arrayAssignment.txt index 562c07eb199..8e47f7e66ce 100644 --- a/compiler/testData/ir/irText/expressions/arrayAssignment.txt +++ b/compiler/testData/ir/irText/expressions/arrayAssignment.txt @@ -2,26 +2,26 @@ FILE /arrayAssignment.kt FUN public fun test(): kotlin.Unit BLOCK_BODY VAR val x: kotlin.IntArray - CALL .intArrayOf type=kotlin.IntArray operator=null + 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' - CALL .set type=kotlin.Unit operator=EQ - $this: GET_VAR x type=kotlin.IntArray operator=null + CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=EQ + $this: GET_VAR 'x: IntArray' type=kotlin.IntArray operator=null index: CONST Int type=kotlin.Int value='1' value: CONST Int type=kotlin.Int value='0' FUN public fun foo(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=foo + RETURN type=kotlin.Nothing from='foo(): Int' CONST Int type=kotlin.Int value='1' FUN public fun test2(): kotlin.Unit BLOCK_BODY - CALL .set type=kotlin.Unit operator=EQ - $this: CALL .intArrayOf type=kotlin.IntArray operator=null + CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=EQ + $this: 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' - index: CALL .foo type=kotlin.Int operator=null + index: CALL 'foo(): Int' type=kotlin.Int operator=null value: CONST Int type=kotlin.Int value='1' diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt index 6c5d4974b72..21885d9a1ba 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt @@ -1,74 +1,74 @@ FILE /arrayAugmentedAssignment1.kt FUN public fun foo(): kotlin.IntArray BLOCK_BODY - RETURN type=kotlin.Nothing from=foo - CALL .intArrayOf type=kotlin.IntArray operator=null + RETURN type=kotlin.Nothing from='foo(): IntArray' + 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 bar(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=bar + RETURN type=kotlin.Nothing from='bar(): Int' CONST Int type=kotlin.Int value='42' CLASS CLASS C - CONSTRUCTOR public constructor C(/*0*/ x: kotlin.IntArray) + CONSTRUCTOR public constructor C(x: kotlin.IntArray) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class C type=C - value: GET_VAR x type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: IntArray' type=kotlin.Unit operator=null + receiver: THIS of 'C' type=C + value: GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public final val x: kotlin.IntArray EXPRESSION_BODY - GET_VAR x type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: IntArray' type=kotlin.IntArray operator=INITIALIZE_PROPERTY_FROM_PARAMETER FUN public fun testVariable(): kotlin.Unit BLOCK_BODY VAR var x: kotlin.IntArray - CALL .foo type=kotlin.IntArray operator=null + CALL 'foo(): IntArray' type=kotlin.IntArray operator=null BLOCK type=kotlin.Unit operator=PLUSEQ VAR val tmp0_array: kotlin.IntArray - GET_VAR x type=kotlin.IntArray operator=null + GET_VAR 'x: IntArray' type=kotlin.IntArray operator=null VAR val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' - CALL .set type=kotlin.Unit operator=PLUSEQ - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - value: CALL .plus type=kotlin.Int operator=PLUSEQ - $this: CALL .get type=kotlin.Int operator=PLUSEQ - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null + CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=PLUSEQ + $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null + value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: CALL 'get(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='1' FUN public fun testCall(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=MULTEQ VAR val tmp0_array: kotlin.IntArray - CALL .foo type=kotlin.IntArray operator=null + CALL 'foo(): IntArray' type=kotlin.IntArray operator=null VAR val tmp1_index0: kotlin.Int - CALL .bar type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=MULTEQ - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - value: CALL .times type=kotlin.Int operator=MULTEQ - $this: CALL .get type=kotlin.Int operator=MULTEQ - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null + 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 + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null + value: CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ + $this: CALL 'get(Int): Int' type=kotlin.Int operator=MULTEQ + $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='2' - FUN public fun testMember(/*0*/ c: C): kotlin.Unit + FUN public fun testMember(c: C): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0_array: kotlin.IntArray - CALL . type=kotlin.IntArray operator=GET_PROPERTY - $this: GET_VAR c type=C operator=null + 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 CONST Int type=kotlin.Int value='0' VAR val tmp2: kotlin.Int - CALL .get type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp2 type=kotlin.Int operator=null - GET_VAR tmp2 type=kotlin.Int operator=null + 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 + CALL 'set(Int, Int): Unit' type=kotlin.Unit 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 + value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $this: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + GET_VAR 'tmp2: 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 4a8db302dda..9a198eac52f 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt @@ -1,21 +1,21 @@ FILE /arrayAugmentedAssignment2.kt CLASS INTERFACE IA - FUN public abstract operator fun get(/*0*/ index: kotlin.String): kotlin.Int + FUN public abstract operator fun get(index: kotlin.String): kotlin.Int CLASS INTERFACE IB - FUN public abstract operator fun IA.set(/*0*/ index: kotlin.String, /*1*/ value: kotlin.Int): kotlin.Unit - FUN public fun IB.test(/*0*/ a: IA): kotlin.Unit + FUN public abstract operator fun IA.set(index: kotlin.String, value: kotlin.Int): kotlin.Unit + FUN public fun IB.test(a: IA): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ VAR val tmp0_array: IA - GET_VAR a type=IA operator=null + GET_VAR 'value-parameter a: IA' type=IA operator=null VAR val tmp1_index0: kotlin.String CONST String type=kotlin.String value='' - CALL .set type=kotlin.Unit operator=PLUSEQ - $this: $RECEIVER of: test type=IB - $receiver: GET_VAR tmp0_array type=IA operator=null - index: GET_VAR tmp1_index0 type=kotlin.String operator=null - value: CALL .plus type=kotlin.Int operator=PLUSEQ - $this: CALL .get type=kotlin.Int operator=PLUSEQ - $this: GET_VAR tmp0_array type=IA operator=null - index: GET_VAR tmp1_index0 type=kotlin.String operator=null + CALL 'set(String, Int) on IA: Unit' type=kotlin.Unit operator=PLUSEQ + $this: $RECEIVER of 'test(IA) on IB: Unit' type=IB + $receiver: GET_VAR 'tmp0_array: IA' type=IA operator=null + index: GET_VAR 'tmp1_index0: String' type=kotlin.String operator=null + value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: CALL 'get(String): Int' type=kotlin.Int operator=PLUSEQ + $this: GET_VAR 'tmp0_array: IA' type=IA operator=null + index: GET_VAR 'tmp1_index0: String' type=kotlin.String operator=null other: CONST Int type=kotlin.Int value='42' diff --git a/compiler/testData/ir/irText/expressions/assignments.txt b/compiler/testData/ir/irText/expressions/assignments.txt index c9007196bad..dfad8b8ee52 100644 --- a/compiler/testData/ir/irText/expressions/assignments.txt +++ b/compiler/testData/ir/irText/expressions/assignments.txt @@ -1,27 +1,27 @@ FILE /assignments.kt CLASS CLASS Ref - CONSTRUCTOR public constructor Ref(/*0*/ x: kotlin.Int) + CONSTRUCTOR public constructor Ref(x: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD x type=kotlin.Unit operator=null - receiver: THIS public final class Ref type=Ref - value: GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Ref + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'x: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Ref' type=Ref + value: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Ref' PROPERTY public final var x: kotlin.Int EXPRESSION_BODY - GET_VAR x type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER FUN public fun test1(): kotlin.Unit BLOCK_BODY VAR var x: kotlin.Int CONST Int type=kotlin.Int value='0' - SET_VAR x type=kotlin.Unit operator=EQ + SET_VAR 'x: Int' type=kotlin.Unit operator=EQ CONST Int type=kotlin.Int value='1' - SET_VAR x type=kotlin.Unit operator=EQ - CALL .plus type=kotlin.Int operator=PLUS - $this: GET_VAR x type=kotlin.Int operator=null + SET_VAR 'x: Int' type=kotlin.Unit operator=EQ + CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='1' - FUN public fun test2(/*0*/ r: Ref): kotlin.Unit + FUN public fun test2(r: Ref): kotlin.Unit BLOCK_BODY - CALL . type=kotlin.Unit operator=EQ - $this: GET_VAR r type=Ref operator=null + CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: GET_VAR 'value-parameter r: Ref' type=Ref operator=null : CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt index e9116015021..312e65cf6cd 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment1.txt @@ -6,50 +6,50 @@ FILE /augmentedAssignment1.kt BLOCK_BODY VAR var x: kotlin.Int CONST Int type=kotlin.Int value='0' - SET_VAR x type=kotlin.Unit operator=PLUSEQ - CALL .plus type=kotlin.Int operator=PLUSEQ - $this: GET_VAR x type=kotlin.Int operator=PLUSEQ + SET_VAR 'x: Int' type=kotlin.Unit operator=PLUSEQ + CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: GET_VAR 'x: Int' type=kotlin.Int operator=PLUSEQ other: CONST Int type=kotlin.Int value='1' - SET_VAR x type=kotlin.Unit operator=MINUSEQ - CALL .minus type=kotlin.Int operator=MINUSEQ - $this: GET_VAR x type=kotlin.Int operator=MINUSEQ + SET_VAR 'x: Int' type=kotlin.Unit operator=MINUSEQ + CALL 'minus(Int): Int' type=kotlin.Int operator=MINUSEQ + $this: GET_VAR 'x: Int' type=kotlin.Int operator=MINUSEQ other: CONST Int type=kotlin.Int value='2' - SET_VAR x type=kotlin.Unit operator=MULTEQ - CALL .times type=kotlin.Int operator=MULTEQ - $this: GET_VAR x type=kotlin.Int operator=MULTEQ + SET_VAR 'x: Int' type=kotlin.Unit operator=MULTEQ + CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ + $this: GET_VAR 'x: Int' type=kotlin.Int operator=MULTEQ other: CONST Int type=kotlin.Int value='3' - SET_VAR x type=kotlin.Unit operator=DIVEQ - CALL .div type=kotlin.Int operator=DIVEQ - $this: GET_VAR x type=kotlin.Int operator=DIVEQ + SET_VAR 'x: Int' type=kotlin.Unit operator=DIVEQ + CALL 'div(Int): Int' type=kotlin.Int operator=DIVEQ + $this: GET_VAR 'x: Int' type=kotlin.Int operator=DIVEQ other: CONST Int type=kotlin.Int value='4' - SET_VAR x type=kotlin.Unit operator=PERCEQ - CALL .mod type=kotlin.Int operator=PERCEQ - $this: GET_VAR x type=kotlin.Int operator=PERCEQ + SET_VAR 'x: Int' type=kotlin.Unit operator=PERCEQ + CALL 'mod(Int): Int' type=kotlin.Int operator=PERCEQ + $this: GET_VAR 'x: Int' type=kotlin.Int operator=PERCEQ other: CONST Int type=kotlin.Int value='5' FUN public fun testProperty(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ - CALL . type=kotlin.Unit operator=PLUSEQ - : CALL .plus type=kotlin.Int operator=PLUSEQ - $this: CALL . type=kotlin.Int operator=PLUSEQ + CALL '(Int): Unit' type=kotlin.Unit operator=PLUSEQ + : CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: CALL '(): Int' type=kotlin.Int operator=PLUSEQ other: CONST Int type=kotlin.Int value='1' BLOCK type=kotlin.Unit operator=MINUSEQ - CALL . type=kotlin.Unit operator=MINUSEQ - : CALL .minus type=kotlin.Int operator=MINUSEQ - $this: CALL . type=kotlin.Int operator=MINUSEQ + CALL '(Int): Unit' type=kotlin.Unit operator=MINUSEQ + : CALL 'minus(Int): Int' type=kotlin.Int operator=MINUSEQ + $this: CALL '(): Int' type=kotlin.Int operator=MINUSEQ other: CONST Int type=kotlin.Int value='2' BLOCK type=kotlin.Unit operator=MULTEQ - CALL . type=kotlin.Unit operator=MULTEQ - : CALL .times type=kotlin.Int operator=MULTEQ - $this: CALL . type=kotlin.Int operator=MULTEQ + CALL '(Int): Unit' type=kotlin.Unit operator=MULTEQ + : CALL 'times(Int): Int' type=kotlin.Int operator=MULTEQ + $this: CALL '(): Int' type=kotlin.Int operator=MULTEQ other: CONST Int type=kotlin.Int value='3' BLOCK type=kotlin.Unit operator=DIVEQ - CALL . type=kotlin.Unit operator=DIVEQ - : CALL .div type=kotlin.Int operator=DIVEQ - $this: CALL . type=kotlin.Int operator=DIVEQ + CALL '(Int): Unit' type=kotlin.Unit operator=DIVEQ + : CALL 'div(Int): Int' type=kotlin.Int operator=DIVEQ + $this: CALL '(): Int' type=kotlin.Int operator=DIVEQ other: CONST Int type=kotlin.Int value='4' BLOCK type=kotlin.Unit operator=PERCEQ - CALL . type=kotlin.Unit operator=PERCEQ - : CALL .mod type=kotlin.Int operator=PERCEQ - $this: CALL . type=kotlin.Int operator=PERCEQ + CALL '(Int): Unit' type=kotlin.Unit operator=PERCEQ + : CALL 'mod(Int): Int' type=kotlin.Int operator=PERCEQ + $this: CALL '(): Int' type=kotlin.Int operator=PERCEQ other: CONST Int type=kotlin.Int value='5' diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt index 1ce4bc06ead..b82dc58c434 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt @@ -2,59 +2,59 @@ FILE /augmentedAssignment2.kt CLASS CLASS A CONSTRUCTOR public constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A - FUN public operator fun A.plusAssign(/*0*/ s: kotlin.String): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN public operator fun A.plusAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public operator fun A.minusAssign(/*0*/ s: kotlin.String): kotlin.Unit + FUN public operator fun A.minusAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public operator fun A.timesAssign(/*0*/ s: kotlin.String): kotlin.Unit + FUN public operator fun A.timesAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public operator fun A.divAssign(/*0*/ s: kotlin.String): kotlin.Unit + FUN public operator fun A.divAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public operator fun A.modAssign(/*0*/ s: kotlin.String): kotlin.Unit + FUN public operator fun A.modAssign(s: kotlin.String): kotlin.Unit BLOCK_BODY PROPERTY public val p: A EXPRESSION_BODY - CALL . type=A operator=null + CALL 'constructor A()' type=A operator=null FUN public fun testVariable(): kotlin.Unit BLOCK_BODY VAR val a: A - CALL . type=A operator=null - CALL .plusAssign type=kotlin.Unit operator=PLUSEQ - $receiver: GET_VAR a type=A operator=PLUSEQ + CALL 'constructor A()' type=A operator=null + CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit operator=PLUSEQ + $receiver: GET_VAR 'a: A' type=A operator=PLUSEQ s: CONST String type=kotlin.String value='+=' - CALL .minusAssign type=kotlin.Unit operator=MINUSEQ - $receiver: GET_VAR a type=A operator=MINUSEQ + CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit operator=MINUSEQ + $receiver: GET_VAR 'a: A' type=A operator=MINUSEQ s: CONST String type=kotlin.String value='-=' - CALL .timesAssign type=kotlin.Unit operator=MULTEQ - $receiver: GET_VAR a type=A operator=MULTEQ + CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit operator=MULTEQ + $receiver: GET_VAR 'a: A' type=A operator=MULTEQ s: CONST String type=kotlin.String value='*=' - CALL .divAssign type=kotlin.Unit operator=DIVEQ - $receiver: GET_VAR a type=A operator=DIVEQ + CALL 'divAssign(String) on A: Unit' type=kotlin.Unit operator=DIVEQ + $receiver: GET_VAR 'a: A' type=A operator=DIVEQ s: CONST String type=kotlin.String value='/=' - CALL .modAssign type=kotlin.Unit operator=PERCEQ - $receiver: GET_VAR a type=A operator=PERCEQ + CALL 'modAssign(String) on A: Unit' type=kotlin.Unit operator=PERCEQ + $receiver: GET_VAR 'a: A' type=A operator=PERCEQ s: CONST String type=kotlin.String value='*=' FUN public fun testProperty(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ - CALL .plusAssign type=kotlin.Unit operator=PLUSEQ - $receiver: CALL . type=A operator=PLUSEQ + CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit operator=PLUSEQ + $receiver: CALL '(): A' type=A operator=PLUSEQ s: CONST String type=kotlin.String value='+=' BLOCK type=kotlin.Unit operator=MINUSEQ - CALL .minusAssign type=kotlin.Unit operator=MINUSEQ - $receiver: CALL . type=A operator=MINUSEQ + CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit operator=MINUSEQ + $receiver: CALL '(): A' type=A operator=MINUSEQ s: CONST String type=kotlin.String value='-=' BLOCK type=kotlin.Unit operator=MULTEQ - CALL .timesAssign type=kotlin.Unit operator=MULTEQ - $receiver: CALL . type=A operator=MULTEQ + CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit operator=MULTEQ + $receiver: CALL '(): A' type=A operator=MULTEQ s: CONST String type=kotlin.String value='*=' BLOCK type=kotlin.Unit operator=DIVEQ - CALL .divAssign type=kotlin.Unit operator=DIVEQ - $receiver: CALL . type=A operator=DIVEQ + CALL 'divAssign(String) on A: Unit' type=kotlin.Unit operator=DIVEQ + $receiver: CALL '(): A' type=A operator=DIVEQ s: CONST String type=kotlin.String value='/=' BLOCK type=kotlin.Unit operator=PERCEQ - CALL .modAssign type=kotlin.Unit operator=PERCEQ - $receiver: CALL . type=A operator=PERCEQ + CALL 'modAssign(String) on A: Unit' type=kotlin.Unit operator=PERCEQ + $receiver: CALL '(): A' type=A operator=PERCEQ s: CONST String type=kotlin.String value='%=' diff --git a/compiler/testData/ir/irText/expressions/bangbang.txt b/compiler/testData/ir/irText/expressions/bangbang.txt index 26c9abd5655..ec3c5e7fd74 100644 --- a/compiler/testData/ir/irText/expressions/bangbang.txt +++ b/compiler/testData/ir/irText/expressions/bangbang.txt @@ -1,34 +1,34 @@ FILE /bangbang.kt - FUN public fun test1(/*0*/ a: kotlin.Any?): kotlin.Any + FUN public fun test1(a: kotlin.Any?): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 + RETURN type=kotlin.Nothing from='test1(Any?): Any' BLOCK type=kotlin.Any operator=EXCLEXCL VAR val tmp0_notnull: kotlin.Any? - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_notnull type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: CALL .THROW_NPE type=kotlin.Nothing operator=EXCLEXCL - else: GET_VAR tmp0_notnull type=kotlin.Any? operator=null - FUN public fun test2(/*0*/ a: kotlin.Any?): kotlin.Int + then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing operator=EXCLEXCL + else: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? operator=null + FUN public fun test2(a: kotlin.Any?): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(Any?): Int' BLOCK type=kotlin.Int operator=EXCLEXCL VAR val tmp1_notnull: kotlin.Int? BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.Any? - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .hashCode type=kotlin.Int operator=null - $this: GET_VAR tmp0_safe_receiver type=kotlin.Any? operator=null + else: CALL 'hashCode(): Int' type=kotlin.Int operator=null + $this: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Int operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp1_notnull type=kotlin.Int? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: CALL .THROW_NPE type=kotlin.Nothing operator=EXCLEXCL - else: GET_VAR tmp1_notnull type=kotlin.Int? operator=null + then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing operator=EXCLEXCL + else: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? operator=null diff --git a/compiler/testData/ir/irText/expressions/booleanOperators.txt b/compiler/testData/ir/irText/expressions/booleanOperators.txt index 2a89ae82c0d..73897376a3e 100644 --- a/compiler/testData/ir/irText/expressions/booleanOperators.txt +++ b/compiler/testData/ir/irText/expressions/booleanOperators.txt @@ -1,27 +1,27 @@ FILE /booleanOperators.kt - FUN public fun test1(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean + FUN public fun test1(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 + RETURN type=kotlin.Nothing from='test1(Boolean, Boolean): Boolean' WHEN type=kotlin.Boolean operator=ANDAND - if: GET_VAR a type=kotlin.Boolean operator=null - then: GET_VAR b type=kotlin.Boolean operator=null + if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null + then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null else: CONST Boolean type=kotlin.Boolean value='false' - FUN public fun test2(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean + FUN public fun test2(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(Boolean, Boolean): Boolean' WHEN type=kotlin.Boolean operator=OROR - if: GET_VAR a type=kotlin.Boolean operator=null + if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null then: CONST Boolean type=kotlin.Boolean value='true' - else: GET_VAR b type=kotlin.Boolean operator=null - FUN public fun test1x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean + else: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null + FUN public fun test1x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1x - CALL .and type=kotlin.Boolean operator=null - $this: GET_VAR a type=kotlin.Boolean operator=null - other: GET_VAR b type=kotlin.Boolean operator=null - FUN public fun test2x(/*0*/ a: kotlin.Boolean, /*1*/ b: kotlin.Boolean): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1x(Boolean, Boolean): Boolean' + CALL 'and(Boolean): Boolean' type=kotlin.Boolean operator=null + $this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null + other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null + FUN public fun test2x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2x - CALL .or type=kotlin.Boolean operator=null - $this: GET_VAR a type=kotlin.Boolean operator=null - other: GET_VAR b type=kotlin.Boolean operator=null + RETURN type=kotlin.Nothing from='test2x(Boolean, Boolean): Boolean' + CALL 'or(Boolean): Boolean' type=kotlin.Boolean operator=null + $this: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean operator=null + other: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean operator=null diff --git a/compiler/testData/ir/irText/expressions/boxOk.txt b/compiler/testData/ir/irText/expressions/boxOk.txt index 779a0dec3fc..6fd35a5ac6c 100644 --- a/compiler/testData/ir/irText/expressions/boxOk.txt +++ b/compiler/testData/ir/irText/expressions/boxOk.txt @@ -1,5 +1,5 @@ FILE /boxOk.kt FUN public fun box(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=box + RETURN type=kotlin.Nothing from='box(): String' CONST String type=kotlin.String value='OK' diff --git a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt index 4a8a542aa81..bf2feb2c5da 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInLoopHeader.txt @@ -1,5 +1,5 @@ FILE /breakContinueInLoopHeader.kt - FUN public fun test1(/*0*/ c: kotlin.Boolean?): kotlin.Unit + FUN public fun test1(c: kotlin.Boolean?): kotlin.Unit BLOCK_BODY WHILE label=L operator=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value='true' @@ -7,14 +7,14 @@ FILE /breakContinueInLoopHeader.kt WHILE label=null operator=WHILE_LOOP condition: BLOCK type=kotlin.Boolean operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Boolean? - GET_VAR c type=kotlin.Boolean? operator=null + GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null WHEN type=kotlin.Boolean operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Boolean? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: BREAK label=null loop.label=L depth=1 - else: GET_VAR tmp0_elvis_lhs type=kotlin.Boolean? operator=null - FUN public fun test2(/*0*/ c: kotlin.Boolean?): kotlin.Unit + else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null + FUN public fun test2(c: kotlin.Boolean?): kotlin.Unit BLOCK_BODY WHILE label=L operator=WHILE_LOOP condition: CONST Boolean type=kotlin.Boolean value='true' @@ -22,58 +22,58 @@ FILE /breakContinueInLoopHeader.kt WHILE label=null operator=WHILE_LOOP condition: BLOCK type=kotlin.Boolean operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Boolean? - GET_VAR c type=kotlin.Boolean? operator=null + GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? operator=null WHEN type=kotlin.Boolean operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Boolean? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONTINUE label=null loop.label=L depth=1 - else: GET_VAR tmp0_elvis_lhs type=kotlin.Boolean? operator=null - FUN public fun test3(/*0*/ ss: kotlin.collections.List?): kotlin.Unit + else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? operator=null + FUN public fun test3(ss: kotlin.collections.List?): kotlin.Unit BLOCK_BODY WHILE label=L operator=WHILE_LOOP 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_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? - GET_VAR ss type=kotlin.collections.List? operator=null + GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? operator=null WHEN type=kotlin.collections.List operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.collections.List? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: List?' type=kotlin.collections.List? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONTINUE label=null loop.label=L depth=0 - else: GET_VAR tmp0_elvis_lhs type=kotlin.collections.List? operator=null + else: GET_VAR 'tmp0_elvis_lhs: List?' type=kotlin.collections.List? operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE VAR val s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null - FUN public fun test4(/*0*/ ss: kotlin.collections.List?): kotlin.Unit + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null + FUN public fun test4(ss: kotlin.collections.List?): kotlin.Unit BLOCK_BODY WHILE label=L operator=WHILE_LOOP 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_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? - GET_VAR ss type=kotlin.collections.List? operator=null + GET_VAR 'value-parameter ss: List?' type=kotlin.collections.List? operator=null WHEN type=kotlin.collections.List operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.collections.List? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: List?' type=kotlin.collections.List? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: BREAK label=null loop.label=L depth=0 - else: GET_VAR tmp0_elvis_lhs type=kotlin.collections.List? operator=null + else: GET_VAR 'tmp0_elvis_lhs: List?' type=kotlin.collections.List? operator=null WHILE label=null operator=FOR_LOOP_INNER_WHILE - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE VAR val s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null diff --git a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt index 831e0263542..6f8980810d9 100644 --- a/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt +++ b/compiler/testData/ir/irText/expressions/callWithReorderedArguments.txt @@ -1,40 +1,40 @@ FILE /callWithReorderedArguments.kt - FUN public fun foo(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Unit + FUN public fun foo(a: kotlin.Int, b: kotlin.Int): kotlin.Unit BLOCK_BODY FUN public fun noReorder1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=noReorder1 + RETURN type=kotlin.Nothing from='noReorder1(): Int' CONST Int type=kotlin.Int value='1' FUN public fun noReorder2(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=noReorder2 + RETURN type=kotlin.Nothing from='noReorder2(): Int' CONST Int type=kotlin.Int value='2' FUN public fun reordered1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=reordered1 + RETURN type=kotlin.Nothing from='reordered1(): Int' CONST Int type=kotlin.Int value='1' FUN public fun reordered2(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=reordered2 + RETURN type=kotlin.Nothing from='reordered2(): Int' CONST Int type=kotlin.Int value='2' FUN public fun test(): kotlin.Unit BLOCK_BODY - CALL .foo type=kotlin.Unit operator=null - a: CALL .noReorder1 type=kotlin.Int operator=null - b: CALL .noReorder2 type=kotlin.Int operator=null + CALL 'foo(Int, Int): Unit' type=kotlin.Unit operator=null + 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 - CALL .reordered1 type=kotlin.Int operator=null + CALL 'reordered1(): Int' type=kotlin.Int operator=null VAR val tmp1_a: kotlin.Int - CALL .reordered2 type=kotlin.Int operator=null - CALL .foo type=kotlin.Unit operator=null - a: GET_VAR tmp1_a type=kotlin.Int operator=null - b: GET_VAR tmp0_b type=kotlin.Int operator=null + 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 CONST Int type=kotlin.Int value='1' VAR val tmp3_a: kotlin.Int - CALL .reordered2 type=kotlin.Int operator=null - CALL .foo type=kotlin.Unit operator=null - a: GET_VAR tmp3_a type=kotlin.Int operator=null - b: GET_VAR tmp2_b type=kotlin.Int operator=null + 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 + b: GET_VAR 'tmp2_b: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/calls.txt b/compiler/testData/ir/irText/expressions/calls.txt index 54f3c860a87..bdc254b8de1 100644 --- a/compiler/testData/ir/irText/expressions/calls.txt +++ b/compiler/testData/ir/irText/expressions/calls.txt @@ -1,36 +1,36 @@ FILE /calls.kt - FUN public fun foo(/*0*/ x: kotlin.Int, /*1*/ y: kotlin.Int): kotlin.Int + FUN public fun foo(x: kotlin.Int, y: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=foo - GET_VAR x type=kotlin.Int operator=null - FUN public fun bar(/*0*/ x: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='foo(Int, Int): Int' + GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null + FUN public fun bar(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=bar - CALL .foo type=kotlin.Int operator=null - x: GET_VAR x type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='bar(Int): Int' + CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null + x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null y: CONST Int type=kotlin.Int value='1' - FUN public fun qux(/*0*/ x: kotlin.Int): kotlin.Int + FUN public fun qux(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=qux - CALL .foo type=kotlin.Int operator=null - x: CALL .foo type=kotlin.Int operator=null - x: GET_VAR x type=kotlin.Int operator=null - y: GET_VAR x type=kotlin.Int operator=null - y: GET_VAR x type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='qux(Int): Int' + CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null + x: CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null + x: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null + y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null + y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null FUN public fun kotlin.Int.ext1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=ext1 - $RECEIVER of: ext1 type=kotlin.Int - FUN public fun kotlin.Int.ext2(/*0*/ x: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='ext1() on Int: Int' + $RECEIVER of 'ext1() on Int: Int' type=kotlin.Int + FUN public fun kotlin.Int.ext2(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=ext2 - CALL .foo type=kotlin.Int operator=null - x: $RECEIVER of: ext2 type=kotlin.Int - y: GET_VAR x type=kotlin.Int operator=null - FUN public fun kotlin.Int.ext3(/*0*/ x: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='ext2(Int) on Int: Int' + CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null + x: $RECEIVER of 'ext2(Int) on Int: Int' type=kotlin.Int + y: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null + FUN public fun kotlin.Int.ext3(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=ext3 - CALL .foo type=kotlin.Int operator=null - x: CALL .ext1 type=kotlin.Int operator=null - $receiver: $RECEIVER of: ext3 type=kotlin.Int - y: GET_VAR x type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='ext3(Int) on Int: Int' + CALL 'foo(Int, Int): Int' type=kotlin.Int operator=null + x: CALL 'ext1() on Int: Int' type=kotlin.Int operator=null + $receiver: $RECEIVER of 'ext3(Int) on Int: Int' type=kotlin.Int + y: GET_VAR 'value-parameter x: 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 018a4f64a34..e9a8c61156f 100644 --- a/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt +++ b/compiler/testData/ir/irText/expressions/chainOfSafeCalls.txt @@ -2,19 +2,19 @@ FILE /chainOfSafeCalls.kt CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='C' FUN public final fun foo(): C BLOCK_BODY - RETURN type=kotlin.Nothing from=foo - THIS public final class C type=C + RETURN type=kotlin.Nothing from='foo(): C' + THIS of 'C' type=C FUN public final fun bar(): C? BLOCK_BODY - RETURN type=kotlin.Nothing from=bar - THIS public final class C type=C - FUN public fun test(/*0*/ nc: C?): C? + RETURN type=kotlin.Nothing from='bar(): C?' + THIS of 'C' type=C + FUN public fun test(nc: C?): C? BLOCK_BODY - RETURN type=kotlin.Nothing from=test + RETURN type=kotlin.Nothing from='test(C?): C?' BLOCK type=C? operator=SAFE_CALL VAR val tmp3_safe_receiver: C? BLOCK type=C? operator=SAFE_CALL @@ -23,32 +23,32 @@ FILE /chainOfSafeCalls.kt VAR val tmp1_safe_receiver: C? BLOCK type=C? operator=SAFE_CALL VAR val tmp0_safe_receiver: C? - GET_VAR nc type=C? operator=null + GET_VAR 'value-parameter nc: C?' type=C? operator=null WHEN type=C? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: C?' type=C? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .foo type=C operator=null - $this: GET_VAR tmp0_safe_receiver type=C? operator=null + else: CALL 'foo(): C' type=C operator=null + $this: GET_VAR 'tmp0_safe_receiver: C?' type=C? operator=null WHEN type=C? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp1_safe_receiver type=C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp1_safe_receiver: C?' type=C? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .bar type=C? operator=null - $this: GET_VAR tmp1_safe_receiver type=C? operator=null + else: CALL 'bar(): C?' type=C? operator=null + $this: GET_VAR 'tmp1_safe_receiver: C?' type=C? operator=null WHEN type=C? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp2_safe_receiver type=C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp2_safe_receiver: C?' type=C? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .foo type=C operator=null - $this: GET_VAR tmp2_safe_receiver type=C? operator=null + else: CALL 'foo(): C' type=C operator=null + $this: GET_VAR 'tmp2_safe_receiver: C?' type=C? operator=null WHEN type=C? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp3_safe_receiver type=C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp3_safe_receiver: C?' type=C? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .foo type=C operator=null - $this: GET_VAR tmp3_safe_receiver type=C? operator=null + else: CALL 'foo(): C' type=C operator=null + $this: GET_VAR 'tmp3_safe_receiver: C?' type=C? operator=null diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt index 4120e972f2f..d60d0e5a54d 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt @@ -2,124 +2,124 @@ FILE /complexAugmentedAssignment.kt CLASS OBJECT X1 CONSTRUCTOR private constructor X1() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=X1 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='X1' PROPERTY public final var x1: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CLASS OBJECT X2 CONSTRUCTOR private constructor X2() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=X2 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='X2' PROPERTY public final var x2: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CLASS OBJECT X3 CONSTRUCTOR private constructor X3() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=X3 + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='X3' PROPERTY public final var x3: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - FUN public fun test1(/*0*/ a: kotlin.IntArray): kotlin.Unit + FUN public fun test1(a: kotlin.IntArray): kotlin.Unit BLOCK_BODY 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 - GET_VAR a type=kotlin.IntArray operator=null + GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray operator=null VAR val tmp2_index0: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0: kotlin.Int - GET_VAR i type=kotlin.Int operator=POSTFIX_INCR - SET_VAR i type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 - CALL .get type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp1_array type=kotlin.IntArray operator=null - index: GET_VAR tmp2_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp1_array type=kotlin.IntArray operator=null - index: GET_VAR tmp2_index0 type=kotlin.Int operator=null - value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp3 type=kotlin.Int operator=null - GET_VAR tmp3 type=kotlin.Int operator=null + 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 + CALL 'set(Int, Int): Unit' type=kotlin.Unit 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 + value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $this: GET_VAR 'tmp3: Int' type=kotlin.Int operator=null + GET_VAR 'tmp3: Int' type=kotlin.Int operator=null FUN public fun test2(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0_this: X1 - GET_OBJECT X1 type=X1 + GET_OBJECT 'X1' type=X1 BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp1: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0_this type=X1 operator=null - CALL . type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp0_this type=X1 operator=null - : CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp0_this: X1' type=X1 operator=null + : CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $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 - GET_OBJECT X2 type=X1.X2 + GET_OBJECT 'X2' type=X1.X2 BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp3: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp2_this type=X1.X2 operator=null - CALL . type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp2_this type=X1.X2 operator=null - : CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp3 type=kotlin.Int operator=null - GET_VAR tmp3 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp2_this: X1.X2' type=X1.X2 operator=null + : CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $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 - GET_OBJECT X3 type=X1.X2.X3 + GET_OBJECT 'X3' type=X1.X2.X3 BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp5: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp4_this type=X1.X2.X3 operator=null - CALL . type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp4_this type=X1.X2.X3 operator=null - : CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp5 type=kotlin.Int operator=null - GET_VAR tmp5 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp4_this: X1.X2.X3' type=X1.X2.X3 operator=null + : CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $this: GET_VAR 'tmp5: Int' type=kotlin.Int operator=null + GET_VAR 'tmp5: Int' type=kotlin.Int operator=null CLASS CLASS B - CONSTRUCTOR public constructor B(/*0*/ s: kotlin.Int = ...) + CONSTRUCTOR public constructor B(s: kotlin.Int = ...) s: EXPRESSION_BODY CONST Int type=kotlin.Int value='0' BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD s type=kotlin.Unit operator=null - receiver: THIS public final class B type=B - value: GET_VAR s type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=B + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 's: Int' type=kotlin.Unit operator=null + receiver: THIS of 'B' type=B + value: GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='B' PROPERTY public final var s: kotlin.Int EXPRESSION_BODY - GET_VAR s type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter s: Int = ...' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS OBJECT Host CONSTRUCTOR private constructor Host() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Host - FUN public final operator fun B.plusAssign(/*0*/ b: B): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Host' + FUN public final operator fun B.plusAssign(b: B): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=PLUSEQ VAR val tmp0_this: B - $RECEIVER of: plusAssign type=B - CALL . type=kotlin.Unit operator=PLUSEQ - $this: GET_VAR tmp0_this type=B operator=null - : CALL .plus type=kotlin.Int operator=PLUSEQ - $this: CALL . type=kotlin.Int operator=PLUSEQ - $this: GET_VAR tmp0_this type=B operator=null - other: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR b type=B operator=null - FUN public fun Host.test3(/*0*/ v: B): kotlin.Unit + $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 + : CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: CALL '(): Int' type=kotlin.Int operator=PLUSEQ + $this: GET_VAR 'tmp0_this: B' type=B operator=null + other: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: GET_VAR 'value-parameter b: B' type=B operator=null + FUN public fun Host.test3(v: B): kotlin.Unit BLOCK_BODY - CALL .plusAssign type=kotlin.Unit operator=PLUSEQ - $this: $RECEIVER of: test3 type=Host - $receiver: GET_VAR v type=B operator=PLUSEQ - b: CALL . type=B operator=null + CALL 'plusAssign(B) on B: Unit' type=kotlin.Unit operator=PLUSEQ + $this: $RECEIVER of 'test3(B) on Host: Unit' type=Host + $receiver: GET_VAR 'value-parameter v: B' type=B operator=PLUSEQ + b: CALL 'constructor B(Int = ...)' type=B operator=null s: CONST Int type=kotlin.Int value='1000' diff --git a/compiler/testData/ir/irText/expressions/conventionComparisons.txt b/compiler/testData/ir/irText/expressions/conventionComparisons.txt index d33086be882..0a9dfd6e043 100644 --- a/compiler/testData/ir/irText/expressions/conventionComparisons.txt +++ b/compiler/testData/ir/irText/expressions/conventionComparisons.txt @@ -1,36 +1,36 @@ FILE /conventionComparisons.kt CLASS INTERFACE IA CLASS INTERFACE IB - FUN public abstract operator fun IA.compareTo(/*0*/ other: IA): kotlin.Int - FUN public fun IB.test1(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean + FUN public abstract operator fun IA.compareTo(other: IA): kotlin.Int + FUN public fun IB.test1(a1: IA, a2: IA): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: $RECEIVER of: test1 type=IB - $receiver: GET_VAR a1 type=IA operator=null - other: GET_VAR a2 type=IA operator=null - FUN public fun IB.test2(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1(IA, IA) on IB: Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(IA) on IA: Int' type=kotlin.Int operator=GT + $this: $RECEIVER of 'test1(IA, IA) on IB: Boolean' type=IB + $receiver: GET_VAR 'value-parameter a1: IA' type=IA operator=null + other: GET_VAR 'value-parameter a2: IA' type=IA operator=null + FUN public fun IB.test2(a1: IA, a2: IA): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: $RECEIVER of: test2 type=IB - $receiver: GET_VAR a1 type=IA operator=null - other: GET_VAR a2 type=IA operator=null - FUN public fun IB.test3(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean + RETURN type=kotlin.Nothing from='test2(IA, IA) on IB: Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(IA) on IA: Int' type=kotlin.Int operator=GTEQ + $this: $RECEIVER of 'test2(IA, IA) on IB: Boolean' type=IB + $receiver: GET_VAR 'value-parameter a1: IA' type=IA operator=null + other: GET_VAR 'value-parameter a2: IA' type=IA operator=null + FUN public fun IB.test3(a1: IA, a2: IA): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: $RECEIVER of: test3 type=IB - $receiver: GET_VAR a1 type=IA operator=null - other: GET_VAR a2 type=IA operator=null - FUN public fun IB.test4(/*0*/ a1: IA, /*1*/ a2: IA): kotlin.Boolean + RETURN type=kotlin.Nothing from='test3(IA, IA) on IB: Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(IA) on IA: Int' type=kotlin.Int operator=LT + $this: $RECEIVER of 'test3(IA, IA) on IB: Boolean' type=IB + $receiver: GET_VAR 'value-parameter a1: IA' type=IA operator=null + other: GET_VAR 'value-parameter a2: IA' type=IA operator=null + FUN public fun IB.test4(a1: IA, a2: IA): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: $RECEIVER of: test4 type=IB - $receiver: GET_VAR a1 type=IA operator=null - other: GET_VAR a2 type=IA operator=null + RETURN type=kotlin.Nothing from='test4(IA, IA) on IB: Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(IA) on IA: Int' type=kotlin.Int operator=LTEQ + $this: $RECEIVER of 'test4(IA, IA) on IB: Boolean' type=IB + $receiver: GET_VAR 'value-parameter a1: IA' type=IA operator=null + other: GET_VAR 'value-parameter a2: IA' type=IA operator=null diff --git a/compiler/testData/ir/irText/expressions/destructuring1.txt b/compiler/testData/ir/irText/expressions/destructuring1.txt index 7f1feedeb75..23f445d6b42 100644 --- a/compiler/testData/ir/irText/expressions/destructuring1.txt +++ b/compiler/testData/ir/irText/expressions/destructuring1.txt @@ -2,31 +2,31 @@ FILE /destructuring1.kt CLASS OBJECT A CONSTRUCTOR private constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' CLASS OBJECT B CONSTRUCTOR private constructor B() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=B + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='B' FUN public final operator fun A.component1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=component1 + RETURN type=kotlin.Nothing from='component1() on A: Int' CONST Int type=kotlin.Int value='1' FUN public final operator fun A.component2(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=component2 + RETURN type=kotlin.Nothing from='component2() on A: Int' CONST Int type=kotlin.Int value='2' FUN public fun B.test(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION VAR val tmp0_container: A - GET_OBJECT A type=A + GET_OBJECT 'A' type=A VAR val x: kotlin.Int - CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1) - $this: $RECEIVER of: test type=B - $receiver: GET_VAR tmp0_container type=A operator=null + CALL 'component1() on A: Int' type=kotlin.Int operator=COMPONENT_N(index=1) + $this: $RECEIVER of 'test() on B: Unit' type=B + $receiver: GET_VAR 'tmp0_container: A' type=A operator=null VAR val y: kotlin.Int - CALL .component2 type=kotlin.Int operator=COMPONENT_N(index=2) - $this: $RECEIVER of: test type=B - $receiver: GET_VAR tmp0_container type=A operator=null + CALL 'component2() on A: Int' type=kotlin.Int operator=COMPONENT_N(index=2) + $this: $RECEIVER of 'test() on B: Unit' type=B + $receiver: GET_VAR 'tmp0_container: A' type=A operator=null diff --git a/compiler/testData/ir/irText/expressions/dotQualified.txt b/compiler/testData/ir/irText/expressions/dotQualified.txt index 1ab545792a9..8d5d15c46bd 100644 --- a/compiler/testData/ir/irText/expressions/dotQualified.txt +++ b/compiler/testData/ir/irText/expressions/dotQualified.txt @@ -1,19 +1,19 @@ FILE /dotQualified.kt - FUN public fun length(/*0*/ s: kotlin.String): kotlin.Int + FUN public fun length(s: kotlin.String): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=length - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR s type=kotlin.String operator=null - FUN public fun lengthN(/*0*/ s: kotlin.String?): kotlin.Int? + RETURN type=kotlin.Nothing from='length(String): Int' + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: GET_VAR 'value-parameter s: String' type=kotlin.String operator=null + FUN public fun lengthN(s: kotlin.String?): kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from=lengthN + RETURN type=kotlin.Nothing from='lengthN(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR s type=kotlin.String? operator=null + GET_VAR 'value-parameter s: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + else: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null diff --git a/compiler/testData/ir/irText/expressions/elvis.txt b/compiler/testData/ir/irText/expressions/elvis.txt index 4b34c975f8c..3b6d1bcfcd6 100644 --- a/compiler/testData/ir/irText/expressions/elvis.txt +++ b/compiler/testData/ir/irText/expressions/elvis.txt @@ -4,77 +4,77 @@ FILE /elvis.kt CONST Null type=kotlin.Nothing? value='null' FUN public fun foo(): kotlin.Any? BLOCK_BODY - RETURN type=kotlin.Nothing from=foo + RETURN type=kotlin.Nothing from='foo(): Any?' CONST Null type=kotlin.Nothing? value='null' - FUN public fun test1(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any): kotlin.Any + FUN public fun test1(a: kotlin.Any?, b: kotlin.Any): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 + RETURN type=kotlin.Nothing from='test1(Any?, Any): Any' BLOCK type=kotlin.Any operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Any? - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: GET_VAR b type=kotlin.Any operator=null - else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null - FUN public fun test2(/*0*/ a: kotlin.String?, /*1*/ b: kotlin.Any): kotlin.Any + then: GET_VAR 'value-parameter b: Any' type=kotlin.Any operator=null + else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null + FUN public fun test2(a: kotlin.String?, b: kotlin.Any): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(String?, Any): Any' BLOCK type=kotlin.Any operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.String? - GET_VAR a type=kotlin.String? operator=null + GET_VAR 'value-parameter a: String?' type=kotlin.String? operator=null WHEN type=kotlin.Any operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: GET_VAR b type=kotlin.Any operator=null - else: GET_VAR tmp0_elvis_lhs type=kotlin.String? operator=null - FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.String + then: GET_VAR 'value-parameter b: Any' type=kotlin.Any operator=null + else: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? operator=null + FUN public fun test3(a: kotlin.Any?, b: kotlin.Any?): kotlin.String BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR b type=kotlin.Any? operator=null - then: RETURN type=kotlin.Nothing from=test3 + GET_VAR 'value-parameter b: Any?' type=kotlin.Any? operator=null + then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' CONST String type=kotlin.String value='' WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String? - GET_VAR a type=kotlin.Any? operator=null - then: RETURN type=kotlin.Nothing from=test3 + GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null + then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' CONST String type=kotlin.String value='' - RETURN type=kotlin.Nothing from=test3 + RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' BLOCK type=kotlin.String operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Any? - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.String operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR b type=kotlin.Any? operator=null + GET_VAR 'value-parameter b: Any?' type=kotlin.Any? operator=null else: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null - FUN public fun test4(/*0*/ x: kotlin.Any): kotlin.Any + GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null + FUN public fun test4(x: kotlin.Any): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 + RETURN type=kotlin.Nothing from='test4(Any): Any' BLOCK type=kotlin.Any operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Any? - CALL . type=kotlin.Any? operator=GET_PROPERTY + CALL '(): Any?' type=kotlin.Any? operator=GET_PROPERTY WHEN type=kotlin.Any operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: GET_VAR x type=kotlin.Any operator=null - else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null - FUN public fun test5(/*0*/ x: kotlin.Any): kotlin.Any + then: GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null + FUN public fun test5(x: kotlin.Any): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 + RETURN type=kotlin.Nothing from='test5(Any): Any' BLOCK type=kotlin.Any operator=ELVIS VAR val tmp0_elvis_lhs: kotlin.Any? - CALL .foo type=kotlin.Any? operator=null + CALL 'foo(): Any?' type=kotlin.Any? operator=null WHEN type=kotlin.Any operator=null - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: GET_VAR x type=kotlin.Any operator=null - else: GET_VAR tmp0_elvis_lhs type=kotlin.Any? operator=null + then: GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? operator=null diff --git a/compiler/testData/ir/irText/expressions/equality.txt b/compiler/testData/ir/irText/expressions/equality.txt index 2e76e8fe23c..a003d19dbf2 100644 --- a/compiler/testData/ir/irText/expressions/equality.txt +++ b/compiler/testData/ir/irText/expressions/equality.txt @@ -1,20 +1,20 @@ FILE /equality.kt - FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + FUN public fun test1(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR a type=kotlin.Int operator=null - arg1: GET_VAR b type=kotlin.Int operator=null - FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1(Int, Int): Boolean' + CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + arg1: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test2(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .NOT type=kotlin.Boolean operator=EXCLEQ - arg0: CALL .EQEQ type=kotlin.Boolean operator=EXCLEQ - arg0: GET_VAR a type=kotlin.Int operator=null - arg1: GET_VAR b type=kotlin.Int operator=null - FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean + RETURN type=kotlin.Nothing from='test2(Int, Int): Boolean' + CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQ + arg0: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + arg1: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test3(a: kotlin.Any?, b: kotlin.Any?): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR a type=kotlin.Any? operator=null - arg1: GET_VAR b type=kotlin.Any? operator=null + RETURN type=kotlin.Nothing from='test3(Any?, Any?): Boolean' + CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null + arg1: GET_VAR 'value-parameter b: Any?' type=kotlin.Any? operator=null diff --git a/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt b/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt index 63be0da9bcc..8f9308844fa 100644 --- a/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt +++ b/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt @@ -2,10 +2,10 @@ FILE /extensionPropertyGetterCall.kt PROPERTY public val kotlin.String.okext: kotlin.String PROPERTY_GETTER public fun kotlin.String.(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='() on String: String' CONST String type=kotlin.String value='OK' FUN public fun kotlin.String.test5(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 - CALL . type=kotlin.String operator=GET_PROPERTY - $receiver: $RECEIVER of: test5 type=kotlin.String + RETURN type=kotlin.Nothing from='test5() on String: String' + CALL '() on String: String' type=kotlin.String operator=GET_PROPERTY + $receiver: $RECEIVER of 'test5() on String: String' type=kotlin.String diff --git a/compiler/testData/ir/irText/expressions/field.txt b/compiler/testData/ir/irText/expressions/field.txt index 9372b6e9886..2b540d689e9 100644 --- a/compiler/testData/ir/irText/expressions/field.txt +++ b/compiler/testData/ir/irText/expressions/field.txt @@ -2,16 +2,16 @@ FILE /field.kt PROPERTY public var testSimple: kotlin.Int EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - PROPERTY_SETTER public fun (/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD testSimple type=kotlin.Unit operator=EQ - value: GET_VAR value type=kotlin.Int operator=null + 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 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' - PROPERTY_SETTER public fun (/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public fun (value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD testAugmented type=kotlin.Unit operator=PLUSEQ - value: CALL .plus type=kotlin.Int operator=PLUSEQ - $this: GET_BACKING_FIELD testAugmented type=kotlin.Int operator=PLUSEQ - other: GET_VAR value type=kotlin.Int operator=null + SET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Unit operator=PLUSEQ + value: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUSEQ + $this: GET_BACKING_FIELD 'testAugmented: Int' type=kotlin.Int operator=PLUSEQ + other: GET_VAR 'value-parameter value: 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 9bc78d96f0f..dd4006da33f 100644 --- a/compiler/testData/ir/irText/expressions/for.txt +++ b/compiler/testData/ir/irText/expressions/for.txt @@ -1,54 +1,54 @@ FILE /for.kt - FUN public fun testEmpty(/*0*/ ss: kotlin.collections.List): kotlin.Unit + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null - FUN public fun testIterable(/*0*/ ss: kotlin.collections.List): kotlin.Unit + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null - message: GET_VAR s type=kotlin.String operator=null - FUN public fun testDestructuring(/*0*/ pp: kotlin.collections.List>): kotlin.Unit + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null + message: GET_VAR 's: String' type=kotlin.String operator=null + 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> - CALL .iterator type=kotlin.collections.Iterator> operator=FOR_LOOP_ITERATOR - $this: GET_VAR pp type=kotlin.collections.List> operator=null + 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 type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator> operator=null + 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 - CALL .next type=kotlin.Pair operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator> operator=null + 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 - CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1) - $this: GET_VAR tmp1_loop_parameter type=kotlin.Pair operator=null + CALL 'component1(): Int' type=kotlin.Int operator=COMPONENT_N(index=1) + $this: GET_VAR 'tmp1_loop_parameter: Pair' type=kotlin.Pair operator=null VAR val s: kotlin.String - CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2) - $this: GET_VAR tmp1_loop_parameter type=kotlin.Pair operator=null + CALL 'component2(): String' type=kotlin.String operator=COMPONENT_N(index=2) + $this: GET_VAR 'tmp1_loop_parameter: Pair' type=kotlin.Pair operator=null BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null - message: GET_VAR i type=kotlin.Int operator=null - CALL .println type=kotlin.Unit operator=null - message: GET_VAR s type=kotlin.String operator=null + CALL 'println(Int): Unit' type=kotlin.Unit operator=null + message: GET_VAR 'i: Int' type=kotlin.Int operator=null + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null + message: GET_VAR 's: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt index 66399b6167e..b49520be400 100644 --- a/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt +++ b/compiler/testData/ir/irText/expressions/forWithBreakContinue.txt @@ -1,89 +1,89 @@ FILE /forWithBreakContinue.kt - FUN public fun testForBreak1(/*0*/ ss: kotlin.collections.List): kotlin.Unit + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null BREAK label=null loop.label=null depth=0 - FUN public fun testForBreak2(/*0*/ ss: kotlin.collections.List): kotlin.Unit + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s1: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE VAR val s2: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null BREAK label=OUTER loop.label=OUTER depth=1 BREAK label=INNER loop.label=INNER depth=0 BREAK label=null loop.label=INNER depth=0 BREAK label=OUTER loop.label=OUTER depth=0 - FUN public fun testForContinue1(/*0*/ ss: kotlin.collections.List): kotlin.Unit + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp0_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null CONTINUE label=null loop.label=null depth=0 - FUN public fun testForContinue2(/*0*/ ss: kotlin.collections.List): kotlin.Unit + 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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + 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 s1: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp0_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $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 - CALL .iterator type=kotlin.collections.Iterator operator=FOR_LOOP_ITERATOR - $this: GET_VAR ss type=kotlin.collections.List operator=null + 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 - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE VAR val s2: kotlin.String - CALL .next type=kotlin.String operator=FOR_LOOP_NEXT - $this: GET_VAR tmp1_iterator type=kotlin.collections.Iterator operator=null + CALL 'next(): String' type=kotlin.String operator=FOR_LOOP_NEXT + $this: GET_VAR 'tmp1_iterator: Iterator' type=kotlin.collections.Iterator operator=null BLOCK type=kotlin.Nothing operator=null CONTINUE label=OUTER loop.label=OUTER depth=1 CONTINUE label=INNER loop.label=INNER depth=0 diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt index 161c714b35f..1e8f1645162 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.txt @@ -2,64 +2,64 @@ FILE /forWithImplicitReceivers.kt CLASS OBJECT FiveTimes CONSTRUCTOR private constructor FiveTimes() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=FiveTimes + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='FiveTimes' CLASS CLASS IntCell - CONSTRUCTOR public constructor IntCell(/*0*/ value: kotlin.Int) + CONSTRUCTOR public constructor IntCell(value: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD value type=kotlin.Unit operator=null - receiver: THIS public final class IntCell type=IntCell - value: GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=IntCell + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=null + receiver: THIS of 'IntCell' type=IntCell + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='IntCell' PROPERTY public final var value: kotlin.Int EXPRESSION_BODY - GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS INTERFACE IReceiver FUN public open operator fun FiveTimes.iterator(): IntCell BLOCK_BODY - RETURN type=kotlin.Nothing from=iterator - CALL . type=IntCell operator=null + RETURN type=kotlin.Nothing from='iterator() on FiveTimes: IntCell' + CALL 'constructor IntCell(Int)' type=IntCell operator=null value: CONST Int type=kotlin.Int value='5' FUN public open operator fun IntCell.hasNext(): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=hasNext - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: $RECEIVER of: hasNext type=IntCell + RETURN type=kotlin.Nothing from='hasNext() on IntCell: Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=GT + $this: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: $RECEIVER of 'hasNext() on IntCell: Boolean' type=IntCell other: CONST Int type=kotlin.Int value='0' FUN public open operator fun IntCell.next(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=next + RETURN type=kotlin.Nothing from='next() on IntCell: Int' BLOCK type=kotlin.Int operator=POSTFIX_DECR VAR val tmp0_this: IntCell - $RECEIVER of: next type=IntCell + $RECEIVER of 'next() on IntCell: Int' type=IntCell BLOCK type=kotlin.Int operator=POSTFIX_DECR VAR val tmp1: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_DECR - $this: GET_VAR tmp0_this type=IntCell operator=null - CALL . type=kotlin.Unit operator=POSTFIX_DECR - $this: GET_VAR tmp0_this type=IntCell operator=null - : CALL .dec type=kotlin.Int operator=POSTFIX_DECR - $this: GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp0_this: IntCell' type=IntCell operator=null + : CALL 'dec(): Int' type=kotlin.Int operator=POSTFIX_DECR + $this: GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null FUN public fun IReceiver.test(): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit operator=FOR_LOOP VAR val tmp0_iterator: IntCell - CALL .iterator type=IntCell operator=FOR_LOOP_ITERATOR - $this: $RECEIVER of: test type=IReceiver - $receiver: GET_OBJECT FiveTimes type=FiveTimes + 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 WHILE label=null operator=FOR_LOOP_INNER_WHILE - condition: CALL .hasNext type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT - $this: $RECEIVER of: test type=IReceiver - $receiver: GET_VAR tmp0_iterator type=IntCell operator=null + condition: CALL 'hasNext() on IntCell: Boolean' type=kotlin.Boolean operator=FOR_LOOP_HAS_NEXT + $this: $RECEIVER of 'test() on IReceiver: Unit' type=IReceiver + $receiver: GET_VAR 'tmp0_iterator: IntCell' type=IntCell operator=null body: BLOCK type=kotlin.Unit operator=FOR_LOOP_INNER_WHILE VAR val i: kotlin.Int - CALL .next type=kotlin.Int operator=FOR_LOOP_NEXT - $this: $RECEIVER of: test type=IReceiver - $receiver: GET_VAR tmp0_iterator type=IntCell operator=null + CALL 'next() on IntCell: Int' type=kotlin.Int operator=FOR_LOOP_NEXT + $this: $RECEIVER of 'test() on IReceiver: Unit' type=IReceiver + $receiver: GET_VAR 'tmp0_iterator: IntCell' type=IntCell operator=null BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null - message: GET_VAR i type=kotlin.Int operator=null + CALL 'println(Int): Unit' type=kotlin.Unit operator=null + message: GET_VAR 'i: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/identity.txt b/compiler/testData/ir/irText/expressions/identity.txt index 3e892379d4d..01caf55a0f4 100644 --- a/compiler/testData/ir/irText/expressions/identity.txt +++ b/compiler/testData/ir/irText/expressions/identity.txt @@ -1,20 +1,20 @@ FILE /identity.kt - FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + FUN public fun test1(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ - arg0: GET_VAR a type=kotlin.Int operator=null - arg1: GET_VAR b type=kotlin.Int operator=null - FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1(Int, Int): Boolean' + CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQEQ + arg0: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + arg1: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test2(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .NOT type=kotlin.Boolean operator=EXCLEQEQ - arg0: CALL .EQEQEQ type=kotlin.Boolean operator=EXCLEQEQ - arg0: GET_VAR a type=kotlin.Int operator=null - arg1: GET_VAR b type=kotlin.Int operator=null - FUN public fun test3(/*0*/ a: kotlin.Any?, /*1*/ b: kotlin.Any?): kotlin.Boolean + RETURN type=kotlin.Nothing from='test2(Int, Int): Boolean' + CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=EXCLEQEQ + arg0: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EXCLEQEQ + arg0: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + arg1: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test3(a: kotlin.Any?, b: kotlin.Any?): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .EQEQEQ type=kotlin.Boolean operator=EQEQEQ - arg0: GET_VAR a type=kotlin.Any? operator=null - arg1: GET_VAR b type=kotlin.Any? operator=null + RETURN type=kotlin.Nothing from='test3(Any?, Any?): Boolean' + CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQEQ + arg0: GET_VAR 'value-parameter a: Any?' type=kotlin.Any? operator=null + arg1: GET_VAR 'value-parameter b: Any?' type=kotlin.Any? operator=null diff --git a/compiler/testData/ir/irText/expressions/ifElseIf.txt b/compiler/testData/ir/irText/expressions/ifElseIf.txt index 7f1637601c3..a0f40e407c5 100644 --- a/compiler/testData/ir/irText/expressions/ifElseIf.txt +++ b/compiler/testData/ir/irText/expressions/ifElseIf.txt @@ -1,16 +1,16 @@ FILE /ifElseIf.kt - FUN public fun test(/*0*/ i: kotlin.Int): kotlin.Int + FUN public fun test(i: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test + RETURN type=kotlin.Nothing from='test(Int): Int' WHEN type=kotlin.Int operator=WHEN - if: CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR i type=kotlin.Int operator=null + if: CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter i: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='0' then: CONST Int type=kotlin.Int value='1' - if: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR i type=kotlin.Int operator=null + if: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter i: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='0' then: CONST Int type=kotlin.Int value='-1' else: CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt index b300a4d6b68..2fb6bc757d7 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt @@ -1,7 +1,7 @@ FILE /implicitCastOnPlatformType.kt FUN public fun test(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test + RETURN type=kotlin.Nothing from='test(): String' TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=kotlin.String - CALL .getProperty type=kotlin.String! operator=null + CALL 'getProperty(String!): String!' type=kotlin.String! operator=null p0: CONST String type=kotlin.String value='test' diff --git a/compiler/testData/ir/irText/expressions/in.txt b/compiler/testData/ir/irText/expressions/in.txt index e42d7e63d63..e9e1880a0c0 100644 --- a/compiler/testData/ir/irText/expressions/in.txt +++ b/compiler/testData/ir/irText/expressions/in.txt @@ -1,27 +1,27 @@ FILE /in.kt - FUN public fun test1(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection): kotlin.Boolean + FUN public fun test1(a: kotlin.Any, x: kotlin.collections.Collection): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .contains type=kotlin.Boolean operator=IN - $this: GET_VAR x type=kotlin.collections.Collection operator=null - element: GET_VAR a type=kotlin.Any operator=null - FUN public fun test2(/*0*/ a: kotlin.Any, /*1*/ x: kotlin.collections.Collection): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1(Any, Collection): Boolean' + CALL 'contains(Any): Boolean' type=kotlin.Boolean operator=IN + $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection operator=null + element: GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + FUN public fun test2(a: kotlin.Any, x: kotlin.collections.Collection): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .NOT type=kotlin.Boolean operator=NOT_IN - arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN - $this: GET_VAR x type=kotlin.collections.Collection operator=null - element: GET_VAR a type=kotlin.Any operator=null - FUN public fun test3(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection): kotlin.Boolean + RETURN type=kotlin.Nothing from='test2(Any, Collection): Boolean' + CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=NOT_IN + arg0: CALL 'contains(Any): Boolean' type=kotlin.Boolean operator=NOT_IN + $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection operator=null + element: GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + FUN public fun test3(a: T, x: kotlin.collections.Collection): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .contains type=kotlin.Boolean operator=IN - $this: GET_VAR x type=kotlin.collections.Collection operator=null - element: GET_VAR a type=T operator=null - FUN public fun test4(/*0*/ a: T, /*1*/ x: kotlin.collections.Collection): kotlin.Boolean + RETURN type=kotlin.Nothing from='test3(T, Collection): Boolean' + CALL 'contains(T): Boolean' type=kotlin.Boolean operator=IN + $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection operator=null + element: GET_VAR 'value-parameter a: T' type=T operator=null + FUN public fun test4(a: T, x: kotlin.collections.Collection): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - CALL .NOT type=kotlin.Boolean operator=NOT_IN - arg0: CALL .contains type=kotlin.Boolean operator=NOT_IN - $this: GET_VAR x type=kotlin.collections.Collection operator=null - element: GET_VAR a type=T operator=null + RETURN type=kotlin.Nothing from='test4(T, Collection): Boolean' + CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean operator=NOT_IN + arg0: CALL 'contains(T): Boolean' type=kotlin.Boolean operator=NOT_IN + $this: GET_VAR 'value-parameter x: Collection' type=kotlin.collections.Collection operator=null + element: GET_VAR 'value-parameter a: T' type=T operator=null diff --git a/compiler/testData/ir/irText/expressions/incrementDecrement.txt b/compiler/testData/ir/irText/expressions/incrementDecrement.txt index 9cccba3617a..1e24375e34a 100644 --- a/compiler/testData/ir/irText/expressions/incrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/incrementDecrement.txt @@ -4,7 +4,7 @@ FILE /incrementDecrement.kt CONST Int type=kotlin.Int value='0' PROPERTY public val arr: kotlin.IntArray EXPRESSION_BODY - CALL .intArrayOf type=kotlin.IntArray operator=null + 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' @@ -16,19 +16,19 @@ FILE /incrementDecrement.kt VAR val x1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR VAR val tmp0: kotlin.Int - CALL .inc type=kotlin.Int operator=PREFIX_INCR - $this: GET_VAR x type=kotlin.Int operator=PREFIX_INCR - SET_VAR x type=kotlin.Unit operator=PREFIX_INCR - GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + 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 - CALL .dec type=kotlin.Int operator=PREFIX_DECR - $this: GET_VAR x type=kotlin.Int operator=PREFIX_DECR - SET_VAR x type=kotlin.Unit operator=PREFIX_DECR - GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null FUN public fun testVarPostfix(): kotlin.Unit BLOCK_BODY VAR var x: kotlin.Int @@ -36,124 +36,124 @@ FILE /incrementDecrement.kt VAR val x1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0: kotlin.Int - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + 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 - GET_VAR x type=kotlin.Int operator=POSTFIX_DECR - SET_VAR x type=kotlin.Unit operator=POSTFIX_DECR - CALL .dec type=kotlin.Int operator=POSTFIX_DECR - $this: GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null FUN public fun testPropPrefix(): kotlin.Unit BLOCK_BODY VAR val p1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR BLOCK type=kotlin.Int operator=PREFIX_INCR VAR val tmp0: kotlin.Int - CALL .inc type=kotlin.Int operator=PREFIX_INCR - $this: CALL . type=kotlin.Int operator=PREFIX_INCR - CALL . type=kotlin.Unit operator=PREFIX_INCR - : GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 + : GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null VAR val p2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR BLOCK type=kotlin.Int operator=PREFIX_DECR VAR val tmp1: kotlin.Int - CALL .dec type=kotlin.Int operator=PREFIX_DECR - $this: CALL . type=kotlin.Int operator=PREFIX_DECR - CALL . type=kotlin.Unit operator=PREFIX_DECR - : GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + : GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null FUN public fun testPropPostfix(): kotlin.Unit BLOCK_BODY VAR val p1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_INCR - CALL . type=kotlin.Unit operator=POSTFIX_INCR - : CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null VAR val p2: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_DECR BLOCK type=kotlin.Int operator=PREFIX_DECR VAR val tmp1: kotlin.Int - CALL .dec type=kotlin.Int operator=PREFIX_DECR - $this: CALL . type=kotlin.Int operator=PREFIX_DECR - CALL . type=kotlin.Unit operator=PREFIX_DECR - : GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + : GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null FUN public fun testArrayPrefix(): kotlin.Unit BLOCK_BODY VAR val a1: kotlin.Int BLOCK type=kotlin.Int operator=PREFIX_INCR VAR val tmp0_array: kotlin.IntArray - CALL . type=kotlin.IntArray operator=GET_PROPERTY + CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY VAR val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' VAR val tmp2: kotlin.Int - CALL .inc type=kotlin.Int operator=PREFIX_INCR - $this: CALL .get type=kotlin.Int operator=PREFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=PREFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - value: GET_VAR tmp2 type=kotlin.Int operator=null - GET_VAR tmp2 type=kotlin.Int operator=null + 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 + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null + CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=PREFIX_INCR + $this: GET_VAR 'tmp0_array: IntArray' type=kotlin.IntArray operator=null + index: GET_VAR 'tmp1_index0: Int' type=kotlin.Int operator=null + value: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + 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 - CALL . type=kotlin.IntArray operator=GET_PROPERTY + CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY VAR val tmp4_index0: kotlin.Int CONST Int type=kotlin.Int value='0' VAR val tmp5: kotlin.Int - CALL .dec type=kotlin.Int operator=PREFIX_DECR - $this: CALL .get type=kotlin.Int operator=PREFIX_DECR - $this: GET_VAR tmp3_array type=kotlin.IntArray operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=PREFIX_DECR - $this: GET_VAR tmp3_array type=kotlin.IntArray operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - value: GET_VAR tmp5 type=kotlin.Int operator=null - GET_VAR tmp5 type=kotlin.Int operator=null + 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 + index: GET_VAR 'tmp4_index0: Int' type=kotlin.Int operator=null + CALL 'set(Int, Int): Unit' type=kotlin.Unit operator=PREFIX_DECR + $this: GET_VAR 'tmp3_array: IntArray' type=kotlin.IntArray operator=null + index: GET_VAR 'tmp4_index0: Int' type=kotlin.Int operator=null + value: GET_VAR 'tmp5: Int' type=kotlin.Int operator=null + GET_VAR 'tmp5: Int' type=kotlin.Int operator=null FUN public fun testArrayPostfix(): kotlin.Unit BLOCK_BODY VAR val a1: kotlin.Int BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0_array: kotlin.IntArray - CALL . type=kotlin.IntArray operator=GET_PROPERTY + CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY VAR val tmp1_index0: kotlin.Int CONST Int type=kotlin.Int value='0' VAR val tmp2: kotlin.Int - CALL .get type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp0_array type=kotlin.IntArray operator=null - index: GET_VAR tmp1_index0 type=kotlin.Int operator=null - value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp2 type=kotlin.Int operator=null - GET_VAR tmp2 type=kotlin.Int operator=null + 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 + CALL 'set(Int, Int): Unit' type=kotlin.Unit 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 + value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $this: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + 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 - CALL . type=kotlin.IntArray operator=GET_PROPERTY + CALL '(): IntArray' type=kotlin.IntArray operator=GET_PROPERTY VAR val tmp4_index0: kotlin.Int CONST Int type=kotlin.Int value='0' VAR val tmp5: kotlin.Int - CALL .get type=kotlin.Int operator=POSTFIX_DECR - $this: GET_VAR tmp3_array type=kotlin.IntArray operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=POSTFIX_DECR - $this: GET_VAR tmp3_array type=kotlin.IntArray operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - value: CALL .dec type=kotlin.Int operator=POSTFIX_DECR - $this: GET_VAR tmp5 type=kotlin.Int operator=null - GET_VAR tmp5 type=kotlin.Int operator=null + 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 + CALL 'set(Int, Int): Unit' type=kotlin.Unit 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 + value: CALL 'dec(): Int' type=kotlin.Int operator=POSTFIX_DECR + $this: GET_VAR 'tmp5: Int' type=kotlin.Int operator=null + GET_VAR 'tmp5: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt index e683f9d5a39..6324e03c5df 100644 --- a/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmInstanceFieldReference.txt @@ -2,20 +2,20 @@ FILE /Derived.kt CLASS CLASS Derived CONSTRUCTOR public constructor Derived() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Derived + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Derived' ANONYMOUS_INITIALIZER Derived BLOCK_BODY - SET_BACKING_FIELD value type=kotlin.Unit operator=EQ - receiver: THIS public final class Derived : Base type=Derived + SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=EQ + receiver: THIS of 'Derived' type=Derived value: CONST Int type=kotlin.Int value='0' FUN public final fun getValue(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=getValue - GET_BACKING_FIELD value type=kotlin.Int operator=GET_PROPERTY - receiver: THIS public final class Derived : Base type=Derived - FUN public final fun setValue(/*0*/ value: kotlin.Int): kotlin.Unit + RETURN type=kotlin.Nothing from='getValue(): Int' + GET_BACKING_FIELD 'value: Int' type=kotlin.Int operator=GET_PROPERTY + receiver: THIS of 'Derived' type=Derived + FUN public final fun setValue(value: kotlin.Int): kotlin.Unit BLOCK_BODY - SET_BACKING_FIELD value type=kotlin.Unit operator=EQ - receiver: THIS public final class Derived : Base type=Derived - value: GET_VAR value type=kotlin.Int operator=null + SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=EQ + receiver: THIS of 'Derived' type=Derived + value: GET_VAR 'value-parameter value: 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 98f845dfe30..3664b15a8aa 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt @@ -1,42 +1,42 @@ FILE /jvmStaticFieldReference.kt FUN public fun testFun(): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(String!): Unit' type=kotlin.Unit operator=null $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream - GET_BACKING_FIELD out type=java.io.PrintStream! operator=GET_PROPERTY + GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY p0: CONST String type=kotlin.String value='testFun' PROPERTY public var testProp: kotlin.Any PROPERTY_GETTER public fun (): kotlin.Any BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(String!): Unit' type=kotlin.Unit operator=null $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream - GET_BACKING_FIELD out type=java.io.PrintStream! operator=GET_PROPERTY + GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY p0: CONST String type=kotlin.String value='testProp/get' - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Any' CONST Int type=kotlin.Int value='42' - PROPERTY_SETTER public fun (/*0*/ value: kotlin.Any): kotlin.Unit + PROPERTY_SETTER public fun (value: kotlin.Any): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(String!): Unit' type=kotlin.Unit operator=null $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream - GET_BACKING_FIELD out type=java.io.PrintStream! operator=GET_PROPERTY + GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY p0: CONST String type=kotlin.String value='testProp/set' CLASS CLASS TestClass CONSTRUCTOR public constructor TestClass() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=TestClass + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='TestClass' PROPERTY public final val test: kotlin.Int EXPRESSION_BODY WHEN type=kotlin.Int operator=WHEN else: BLOCK type=kotlin.Int operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(String!): Unit' type=kotlin.Unit operator=null $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream - GET_BACKING_FIELD out type=java.io.PrintStream! operator=GET_PROPERTY + 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' ANONYMOUS_INITIALIZER TestClass BLOCK_BODY - CALL .println type=kotlin.Unit operator=null + CALL 'println(String!): Unit' type=kotlin.Unit operator=null $this: TYPE_OP operator=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream - GET_BACKING_FIELD out type=java.io.PrintStream! operator=GET_PROPERTY + GET_BACKING_FIELD 'out: PrintStream!' type=java.io.PrintStream! operator=GET_PROPERTY p0: CONST String type=kotlin.String value='TestClass/init' diff --git a/compiler/testData/ir/irText/expressions/primitiveComparisons.txt b/compiler/testData/ir/irText/expressions/primitiveComparisons.txt index d62f1632eac..62749af535d 100644 --- a/compiler/testData/ir/irText/expressions/primitiveComparisons.txt +++ b/compiler/testData/ir/irText/expressions/primitiveComparisons.txt @@ -1,169 +1,169 @@ FILE /primitiveComparisons.kt - FUN public fun btest1(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean + FUN public fun btest1(a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=btest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Byte operator=null - other: GET_VAR b type=kotlin.Byte operator=null - FUN public fun btest2(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean + RETURN type=kotlin.Nothing from='btest1(Byte, Byte): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Byte): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Byte' type=kotlin.Byte operator=null + other: GET_VAR 'value-parameter b: Byte' type=kotlin.Byte operator=null + FUN public fun btest2(a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=btest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Byte operator=null - other: GET_VAR b type=kotlin.Byte operator=null - FUN public fun btest3(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean + RETURN type=kotlin.Nothing from='btest2(Byte, Byte): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Byte): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Byte' type=kotlin.Byte operator=null + other: GET_VAR 'value-parameter b: Byte' type=kotlin.Byte operator=null + FUN public fun btest3(a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=btest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Byte operator=null - other: GET_VAR b type=kotlin.Byte operator=null - FUN public fun btest4(/*0*/ a: kotlin.Byte, /*1*/ b: kotlin.Byte): kotlin.Boolean + RETURN type=kotlin.Nothing from='btest3(Byte, Byte): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Byte): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Byte' type=kotlin.Byte operator=null + other: GET_VAR 'value-parameter b: Byte' type=kotlin.Byte operator=null + FUN public fun btest4(a: kotlin.Byte, b: kotlin.Byte): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=btest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Byte operator=null - other: GET_VAR b type=kotlin.Byte operator=null - FUN public fun stest1(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean + RETURN type=kotlin.Nothing from='btest4(Byte, Byte): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Byte): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Byte' type=kotlin.Byte operator=null + other: GET_VAR 'value-parameter b: Byte' type=kotlin.Byte operator=null + FUN public fun stest1(a: kotlin.Short, b: kotlin.Short): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=stest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Short operator=null - other: GET_VAR b type=kotlin.Short operator=null - FUN public fun stest2(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean + RETURN type=kotlin.Nothing from='stest1(Short, Short): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Short): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Short' type=kotlin.Short operator=null + other: GET_VAR 'value-parameter b: Short' type=kotlin.Short operator=null + FUN public fun stest2(a: kotlin.Short, b: kotlin.Short): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=stest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Short operator=null - other: GET_VAR b type=kotlin.Short operator=null - FUN public fun stest3(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean + RETURN type=kotlin.Nothing from='stest2(Short, Short): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Short): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Short' type=kotlin.Short operator=null + other: GET_VAR 'value-parameter b: Short' type=kotlin.Short operator=null + FUN public fun stest3(a: kotlin.Short, b: kotlin.Short): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=stest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Short operator=null - other: GET_VAR b type=kotlin.Short operator=null - FUN public fun stest4(/*0*/ a: kotlin.Short, /*1*/ b: kotlin.Short): kotlin.Boolean + RETURN type=kotlin.Nothing from='stest3(Short, Short): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Short): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Short' type=kotlin.Short operator=null + other: GET_VAR 'value-parameter b: Short' type=kotlin.Short operator=null + FUN public fun stest4(a: kotlin.Short, b: kotlin.Short): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=stest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Short operator=null - other: GET_VAR b type=kotlin.Short operator=null - FUN public fun itest1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='stest4(Short, Short): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Short): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Short' type=kotlin.Short operator=null + other: GET_VAR 'value-parameter b: Short' type=kotlin.Short operator=null + FUN public fun itest1(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=itest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun itest2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='itest1(Int, Int): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun itest2(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=itest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun itest3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='itest2(Int, Int): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun itest3(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=itest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun itest4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Boolean + RETURN type=kotlin.Nothing from='itest3(Int, Int): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun itest4(a: kotlin.Int, b: kotlin.Int): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=itest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun ltest1(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean + RETURN type=kotlin.Nothing from='itest4(Int, Int): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun ltest1(a: kotlin.Long, b: kotlin.Long): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ltest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Long operator=null - other: GET_VAR b type=kotlin.Long operator=null - FUN public fun ltest2(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean + RETURN type=kotlin.Nothing from='ltest1(Long, Long): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Long): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Long' type=kotlin.Long operator=null + other: GET_VAR 'value-parameter b: Long' type=kotlin.Long operator=null + FUN public fun ltest2(a: kotlin.Long, b: kotlin.Long): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ltest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Long operator=null - other: GET_VAR b type=kotlin.Long operator=null - FUN public fun ltest3(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean + RETURN type=kotlin.Nothing from='ltest2(Long, Long): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Long): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Long' type=kotlin.Long operator=null + other: GET_VAR 'value-parameter b: Long' type=kotlin.Long operator=null + FUN public fun ltest3(a: kotlin.Long, b: kotlin.Long): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ltest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Long operator=null - other: GET_VAR b type=kotlin.Long operator=null - FUN public fun ltest4(/*0*/ a: kotlin.Long, /*1*/ b: kotlin.Long): kotlin.Boolean + RETURN type=kotlin.Nothing from='ltest3(Long, Long): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Long): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Long' type=kotlin.Long operator=null + other: GET_VAR 'value-parameter b: Long' type=kotlin.Long operator=null + FUN public fun ltest4(a: kotlin.Long, b: kotlin.Long): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ltest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Long operator=null - other: GET_VAR b type=kotlin.Long operator=null - FUN public fun ftest1(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean + RETURN type=kotlin.Nothing from='ltest4(Long, Long): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Long): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Long' type=kotlin.Long operator=null + other: GET_VAR 'value-parameter b: Long' type=kotlin.Long operator=null + FUN public fun ftest1(a: kotlin.Float, b: kotlin.Float): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ftest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Float operator=null - other: GET_VAR b type=kotlin.Float operator=null - FUN public fun ftest2(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean + RETURN type=kotlin.Nothing from='ftest1(Float, Float): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Float): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Float' type=kotlin.Float operator=null + other: GET_VAR 'value-parameter b: Float' type=kotlin.Float operator=null + FUN public fun ftest2(a: kotlin.Float, b: kotlin.Float): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ftest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Float operator=null - other: GET_VAR b type=kotlin.Float operator=null - FUN public fun ftest3(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean + RETURN type=kotlin.Nothing from='ftest2(Float, Float): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Float): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Float' type=kotlin.Float operator=null + other: GET_VAR 'value-parameter b: Float' type=kotlin.Float operator=null + FUN public fun ftest3(a: kotlin.Float, b: kotlin.Float): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ftest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Float operator=null - other: GET_VAR b type=kotlin.Float operator=null - FUN public fun ftest4(/*0*/ a: kotlin.Float, /*1*/ b: kotlin.Float): kotlin.Boolean + RETURN type=kotlin.Nothing from='ftest3(Float, Float): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Float): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Float' type=kotlin.Float operator=null + other: GET_VAR 'value-parameter b: Float' type=kotlin.Float operator=null + FUN public fun ftest4(a: kotlin.Float, b: kotlin.Float): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=ftest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Float operator=null - other: GET_VAR b type=kotlin.Float operator=null - FUN public fun dtest1(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean + RETURN type=kotlin.Nothing from='ftest4(Float, Float): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Float): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Float' type=kotlin.Float operator=null + other: GET_VAR 'value-parameter b: Float' type=kotlin.Float operator=null + FUN public fun dtest1(a: kotlin.Double, b: kotlin.Double): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=dtest1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.Double operator=null - other: GET_VAR b type=kotlin.Double operator=null - FUN public fun dtest2(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean + RETURN type=kotlin.Nothing from='dtest1(Double, Double): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(Double): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: Double' type=kotlin.Double operator=null + other: GET_VAR 'value-parameter b: Double' type=kotlin.Double operator=null + FUN public fun dtest2(a: kotlin.Double, b: kotlin.Double): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=dtest2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.Double operator=null - other: GET_VAR b type=kotlin.Double operator=null - FUN public fun dtest3(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean + RETURN type=kotlin.Nothing from='dtest2(Double, Double): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Double): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: Double' type=kotlin.Double operator=null + other: GET_VAR 'value-parameter b: Double' type=kotlin.Double operator=null + FUN public fun dtest3(a: kotlin.Double, b: kotlin.Double): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=dtest3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.Double operator=null - other: GET_VAR b type=kotlin.Double operator=null - FUN public fun dtest4(/*0*/ a: kotlin.Double, /*1*/ b: kotlin.Double): kotlin.Boolean + RETURN type=kotlin.Nothing from='dtest3(Double, Double): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(Double): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: Double' type=kotlin.Double operator=null + other: GET_VAR 'value-parameter b: Double' type=kotlin.Double operator=null + FUN public fun dtest4(a: kotlin.Double, b: kotlin.Double): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=dtest4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.Double operator=null - other: GET_VAR b type=kotlin.Double operator=null + RETURN type=kotlin.Nothing from='dtest4(Double, Double): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(Double): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: Double' type=kotlin.Double operator=null + other: GET_VAR 'value-parameter b: Double' type=kotlin.Double operator=null diff --git a/compiler/testData/ir/irText/expressions/references.txt b/compiler/testData/ir/irText/expressions/references.txt index 71334c4b1f0..555255d3bb6 100644 --- a/compiler/testData/ir/irText/expressions/references.txt +++ b/compiler/testData/ir/irText/expressions/references.txt @@ -4,37 +4,37 @@ FILE /references.kt CONST String type=kotlin.String value='OK' PROPERTY public val ok2: kotlin.String = "OK" EXPRESSION_BODY - CALL . type=kotlin.String operator=GET_PROPERTY + CALL '(): String' type=kotlin.String operator=GET_PROPERTY PROPERTY public val ok3: kotlin.String PROPERTY_GETTER public fun (): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): String' CONST String type=kotlin.String value='OK' FUN public fun test1(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL . type=kotlin.String operator=GET_PROPERTY - FUN public fun test2(/*0*/ x: kotlin.String): kotlin.String + RETURN type=kotlin.Nothing from='test1(): String' + CALL '(): String' type=kotlin.String operator=GET_PROPERTY + FUN public fun test2(x: kotlin.String): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - GET_VAR x type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test2(String): String' + GET_VAR 'value-parameter x: String' type=kotlin.String operator=null FUN public fun test3(): kotlin.String BLOCK_BODY VAR val x: kotlin.String = "OK" CONST String type=kotlin.String value='OK' - RETURN type=kotlin.Nothing from=test3 - GET_VAR x type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test3(): String' + GET_VAR 'x: String' type=kotlin.String operator=null FUN public fun test4(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - CALL . type=kotlin.String operator=GET_PROPERTY + RETURN type=kotlin.Nothing from='test4(): String' + CALL '(): String' type=kotlin.String operator=GET_PROPERTY PROPERTY public val kotlin.String.okext: kotlin.String PROPERTY_GETTER public fun kotlin.String.(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='() on String: String' CONST String type=kotlin.String value='OK' FUN public fun kotlin.String.test5(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 - CALL . type=kotlin.String operator=GET_PROPERTY - $receiver: $RECEIVER of: test5 type=kotlin.String + RETURN type=kotlin.Nothing from='test5() on String: String' + CALL '() on String: String' type=kotlin.String operator=GET_PROPERTY + $receiver: $RECEIVER of 'test5() on String: String' type=kotlin.String diff --git a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt index 6ed1f97a8ce..62dc051272f 100644 --- a/compiler/testData/ir/irText/expressions/reflectionLiterals.txt +++ b/compiler/testData/ir/irText/expressions/reflectionLiterals.txt @@ -2,8 +2,8 @@ FILE /reflectionLiterals.kt CLASS CLASS A CONSTRUCTOR public constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' FUN public final fun foo(): kotlin.Unit BLOCK_BODY FUN public fun bar(): kotlin.Unit @@ -13,23 +13,23 @@ FILE /reflectionLiterals.kt CONST Int type=kotlin.Int value='42' PROPERTY public val test1: kotlin.reflect.KClass EXPRESSION_BODY - CLASS_REFERENCE A type=kotlin.reflect.KClass + CLASS_REFERENCE 'A' type=kotlin.reflect.KClass PROPERTY public val test2: kotlin.reflect.KClass EXPRESSION_BODY GET_CLASS type=kotlin.reflect.KClass - CALL . type=kotlin.Int operator=GET_PROPERTY + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY PROPERTY public val test3: kotlin.reflect.KFunction1 EXPRESSION_BODY - CALLABLE_REFERENCE foo type=kotlin.reflect.KFunction1 operator=null + CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction1 operator=null PROPERTY public val test4: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE type=kotlin.reflect.KFunction0 operator=null + CALLABLE_REFERENCE 'constructor A()' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test5: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE foo type=kotlin.reflect.KFunction0 operator=null + CALLABLE_REFERENCE 'foo(): Unit' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test6: kotlin.reflect.KFunction0 EXPRESSION_BODY - CALLABLE_REFERENCE bar type=kotlin.reflect.KFunction0 operator=null + CALLABLE_REFERENCE 'bar(): Unit' type=kotlin.reflect.KFunction0 operator=null PROPERTY public val test7: kotlin.reflect.KProperty0 EXPRESSION_BODY - CALLABLE_REFERENCE qux type=kotlin.reflect.KProperty0 operator=null + CALLABLE_REFERENCE 'qux: Int' 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 9ab2450fcd6..6ca385f859c 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt @@ -2,79 +2,79 @@ FILE /safeCallWithIncrementDecrement.kt CLASS CLASS C CONSTRUCTOR public constructor C() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=C + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='C' PROPERTY public var test.C?.p: kotlin.Int PROPERTY_GETTER public fun test.C?.(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='() on C?: Int' CONST Int type=kotlin.Int value='42' - PROPERTY_SETTER public fun test.C?.(/*0*/ value: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public fun test.C?.(value: kotlin.Int): kotlin.Unit BLOCK_BODY FUN public operator fun kotlin.Int?.inc(): kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from=inc + RETURN type=kotlin.Nothing from='inc() on Int?: Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.Int? - $RECEIVER of: inc type=kotlin.Int? + $RECEIVER of 'inc() on Int?: Int?' type=kotlin.Int? WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.Int? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .inc type=kotlin.Int operator=null - $this: GET_VAR tmp0_safe_receiver type=kotlin.Int? operator=null - FUN public operator fun kotlin.Int?.get(/*0*/ index: kotlin.Int): kotlin.Int + else: CALL 'inc(): Int' type=kotlin.Int operator=null + $this: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? operator=null + FUN public operator fun kotlin.Int?.get(index: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=get + RETURN type=kotlin.Nothing from='get(Int) on Int?: Int' CONST Int type=kotlin.Int value='42' - FUN public operator fun kotlin.Int?.set(/*0*/ index: kotlin.Int, /*1*/ value: kotlin.Int): kotlin.Unit + FUN public operator fun kotlin.Int?.set(index: kotlin.Int, value: kotlin.Int): kotlin.Unit BLOCK_BODY - FUN public fun testProperty(/*0*/ nc: test.C?): kotlin.Unit + 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? - GET_VAR nc type=test.C? operator=null + GET_VAR 'value-parameter nc: C?' type=test.C? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=test.C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? operator=null 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? - GET_VAR tmp0_safe_receiver type=test.C? operator=null + GET_VAR 'tmp0_safe_receiver: C?' type=test.C? operator=null BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp2: kotlin.Int - CALL . type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp1_this type=test.C? operator=null - CALL . type=kotlin.Unit operator=POSTFIX_INCR - $this: GET_VAR tmp1_this type=test.C? operator=null - value: CALL .inc type=kotlin.Int? operator=POSTFIX_INCR - $receiver: GET_VAR tmp2 type=kotlin.Int operator=null - GET_VAR tmp2 type=kotlin.Int operator=null - FUN public fun testArrayAccess(/*0*/ nc: test.C?): kotlin.Unit + 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 + $this: GET_VAR 'tmp1_this: C?' type=test.C? operator=null + value: CALL 'inc() on Int?: Int?' type=kotlin.Int? operator=POSTFIX_INCR + $receiver: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + FUN public fun testArrayAccess(nc: test.C?): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp3_array: kotlin.Int? BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: test.C? - GET_VAR nc type=test.C? operator=null + GET_VAR 'value-parameter nc: C?' type=test.C? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=test.C? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR tmp0_safe_receiver type=test.C? operator=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 CONST Int type=kotlin.Int value='0' VAR val tmp5: kotlin.Int - CALL .get type=kotlin.Int operator=POSTFIX_INCR - $receiver: GET_VAR tmp3_array type=kotlin.Int? operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - CALL .set type=kotlin.Unit operator=POSTFIX_INCR - $receiver: GET_VAR tmp3_array type=kotlin.Int? operator=null - index: GET_VAR tmp4_index0 type=kotlin.Int operator=null - value: CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp5 type=kotlin.Int operator=null - GET_VAR tmp5 type=kotlin.Int operator=null + 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 + CALL 'set(Int, Int) on Int?: Unit' type=kotlin.Unit 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 + value: CALL 'inc(): Int' type=kotlin.Int operator=POSTFIX_INCR + $this: GET_VAR 'tmp5: Int' type=kotlin.Int operator=null + GET_VAR 'tmp5: 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 41debf39ad7..91f4cf7e0bd 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.txt @@ -1,85 +1,85 @@ FILE /safeCalls.kt CLASS CLASS Ref - CONSTRUCTOR public constructor Ref(/*0*/ value: kotlin.Int) + CONSTRUCTOR public constructor Ref(value: kotlin.Int) BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - SET_BACKING_FIELD value type=kotlin.Unit operator=null - receiver: THIS public final class Ref type=Ref - value: GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER - INSTANCE_INITIALIZER_CALL classDescriptor=Ref + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + SET_BACKING_FIELD 'value: Int' type=kotlin.Unit operator=null + receiver: THIS of 'Ref' type=Ref + value: GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + INSTANCE_INITIALIZER_CALL classDescriptor='Ref' PROPERTY public final var value: kotlin.Int EXPRESSION_BODY - GET_VAR value type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER + GET_VAR 'value-parameter value: Int' type=kotlin.Int operator=INITIALIZE_PROPERTY_FROM_PARAMETER CLASS INTERFACE IHost FUN public open fun kotlin.String.extLength(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=extLength - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: $RECEIVER of: extLength type=kotlin.String - FUN public fun test1(/*0*/ x: kotlin.String?): kotlin.Int? + RETURN type=kotlin.Nothing from='extLength() on String: Int' + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: $RECEIVER of 'extLength() on String: Int' type=kotlin.String + FUN public fun test1(x: kotlin.String?): kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 + RETURN type=kotlin.Nothing from='test1(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR x type=kotlin.String? operator=null + GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL . type=kotlin.Int operator=GET_PROPERTY - $this: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null - FUN public fun test2(/*0*/ x: kotlin.String?): kotlin.Int? + else: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null + FUN public fun test2(x: kotlin.String?): kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(String?): Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR x type=kotlin.String? operator=null + GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .hashCode type=kotlin.Int operator=null - $this: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null - FUN public fun test3(/*0*/ x: kotlin.String?, /*1*/ y: kotlin.Any?): kotlin.Boolean? + else: CALL 'hashCode(): Int' type=kotlin.Int operator=null + $this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null + FUN public fun test3(x: kotlin.String?, y: kotlin.Any?): kotlin.Boolean? BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 + RETURN type=kotlin.Nothing from='test3(String?, Any?): Boolean?' BLOCK type=kotlin.Boolean? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR x type=kotlin.String? operator=null + GET_VAR 'value-parameter x: String?' type=kotlin.String? operator=null WHEN type=kotlin.Boolean? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .equals type=kotlin.Boolean operator=null - $this: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null - other: GET_VAR y type=kotlin.Any? operator=null - FUN public fun test4(/*0*/ x: Ref?): kotlin.Unit + else: CALL 'equals(Any?): Boolean' type=kotlin.Boolean operator=null + $this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null + other: GET_VAR 'value-parameter y: Any?' type=kotlin.Any? operator=null + FUN public fun test4(x: Ref?): kotlin.Unit BLOCK_BODY BLOCK type=kotlin.Unit? operator=SAFE_CALL VAR val tmp0_safe_receiver: Ref? - GET_VAR x type=Ref? operator=null + GET_VAR 'value-parameter x: Ref?' type=Ref? operator=null WHEN type=kotlin.Unit? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=Ref? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: Ref?' type=Ref? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL . type=kotlin.Unit operator=EQ - $this: GET_VAR tmp0_safe_receiver type=Ref? operator=null + else: CALL '(Int): Unit' type=kotlin.Unit operator=EQ + $this: GET_VAR 'tmp0_safe_receiver: Ref?' type=Ref? operator=null : CONST Int type=kotlin.Int value='0' - FUN public fun IHost.test5(/*0*/ s: kotlin.String?): kotlin.Int? + FUN public fun IHost.test5(s: kotlin.String?): kotlin.Int? BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 + RETURN type=kotlin.Nothing from='test5(String?) on IHost: Int?' BLOCK type=kotlin.Int? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR s type=kotlin.String? operator=null + GET_VAR 'value-parameter s: String?' type=kotlin.String? operator=null WHEN type=kotlin.Int? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .extLength type=kotlin.Int operator=null - $this: $RECEIVER of: test5 type=IHost - $receiver: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + else: CALL 'extLength() on String: Int' type=kotlin.Int operator=null + $this: $RECEIVER of 'test5(String?) on IHost: Int?' type=IHost + $receiver: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt index 2e05ee0eb34..34e0a9fcb95 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt @@ -2,15 +2,15 @@ FILE /Derived.kt CLASS CLASS Derived CONSTRUCTOR public constructor Derived() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Base - INSTANCE_INITIALIZER_CALL classDescriptor=Derived - FUN public final fun setValue(/*0*/ v: kotlin.Any): kotlin.Unit + DELEGATING_CONSTRUCTOR_CALL 'constructor Base()' + INSTANCE_INITIALIZER_CALL classDescriptor='Derived' + FUN public final fun setValue(v: kotlin.Any): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String - GET_VAR v type=kotlin.Any operator=null + GET_VAR 'value-parameter v: Any' type=kotlin.Any operator=null then: BLOCK type=kotlin.Unit operator=null - SET_BACKING_FIELD value type=kotlin.Unit operator=EQ - receiver: THIS public final class Derived : Base type=Derived + SET_BACKING_FIELD 'value: String!' type=kotlin.Unit operator=EQ + receiver: THIS of 'Derived' type=Derived value: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String! - GET_VAR v type=kotlin.Any operator=null + GET_VAR 'value-parameter v: Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/expressions/simpleOperators.txt b/compiler/testData/ir/irText/expressions/simpleOperators.txt index 0de1301fbd6..7d668406d08 100644 --- a/compiler/testData/ir/irText/expressions/simpleOperators.txt +++ b/compiler/testData/ir/irText/expressions/simpleOperators.txt @@ -1,67 +1,67 @@ FILE /simpleOperators.kt - FUN public fun test1(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + FUN public fun test1(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .plus type=kotlin.Int operator=PLUS - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test2(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test1(Int, Int): Int' + CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test2(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .minus type=kotlin.Int operator=MINUS - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test3(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test2(Int, Int): Int' + CALL 'minus(Int): Int' type=kotlin.Int operator=MINUS + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test3(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .times type=kotlin.Int operator=MUL - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test4(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test3(Int, Int): Int' + CALL 'times(Int): Int' type=kotlin.Int operator=MUL + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test4(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - CALL .div type=kotlin.Int operator=DIV - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test5(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test4(Int, Int): Int' + CALL 'div(Int): Int' type=kotlin.Int operator=DIV + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test5(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 - CALL .mod type=kotlin.Int operator=PERC - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test6(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.ranges.IntRange + RETURN type=kotlin.Nothing from='test5(Int, Int): Int' + CALL 'mod(Int): Int' type=kotlin.Int operator=PERC + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test6(a: kotlin.Int, b: kotlin.Int): kotlin.ranges.IntRange BLOCK_BODY - RETURN type=kotlin.Nothing from=test6 - CALL .rangeTo type=kotlin.ranges.IntRange operator=RANGE - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test1x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test6(Int, Int): IntRange' + CALL 'rangeTo(Int): IntRange' type=kotlin.ranges.IntRange operator=RANGE + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test1x(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test1x - CALL .plus type=kotlin.Int operator=null - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test2x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test1x(Int, Int): Int' + CALL 'plus(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test2x(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test2x - CALL .minus type=kotlin.Int operator=null - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test3x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test2x(Int, Int): Int' + CALL 'minus(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test3x(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test3x - CALL .times type=kotlin.Int operator=null - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test4x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test3x(Int, Int): Int' + CALL 'times(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test4x(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test4x - CALL .div type=kotlin.Int operator=null - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test5x(/*0*/ a: kotlin.Int, /*1*/ b: kotlin.Int): kotlin.Int + RETURN type=kotlin.Nothing from='test4x(Int, Int): Int' + CALL 'div(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test5x(a: kotlin.Int, b: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test5x - CALL .mod type=kotlin.Int operator=null - $this: GET_VAR a type=kotlin.Int operator=null - other: GET_VAR b type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='test5x(Int, Int): Int' + CALL 'mod(Int): Int' type=kotlin.Int operator=null + $this: GET_VAR 'value-parameter a: Int' type=kotlin.Int operator=null + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null diff --git a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.txt b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.txt index 2d8b4efd037..0ed83cfdb13 100644 --- a/compiler/testData/ir/irText/expressions/simpleUnaryOperators.txt +++ b/compiler/testData/ir/irText/expressions/simpleUnaryOperators.txt @@ -1,28 +1,28 @@ FILE /simpleUnaryOperators.kt - FUN public fun test1(/*0*/ x: kotlin.Int): kotlin.Int + FUN public fun test1(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .unaryMinus type=kotlin.Int operator=UMINUS - $this: GET_VAR x type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='test1(Int): Int' + CALL 'unaryMinus(): Int' type=kotlin.Int operator=UMINUS + $this: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null FUN public fun test2(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(): Int' CONST Int type=kotlin.Int value='-42' - FUN public fun test3(/*0*/ x: kotlin.Int): kotlin.Int + FUN public fun test3(x: kotlin.Int): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .unaryPlus type=kotlin.Int operator=UPLUS - $this: GET_VAR x type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='test3(Int): Int' + CALL 'unaryPlus(): Int' type=kotlin.Int operator=UPLUS + $this: GET_VAR 'value-parameter x: Int' type=kotlin.Int operator=null FUN public fun test4(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 + RETURN type=kotlin.Nothing from='test4(): Int' CONST Int type=kotlin.Int value='42' - FUN public fun test5(/*0*/ x: kotlin.Boolean): kotlin.Boolean + FUN public fun test5(x: kotlin.Boolean): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test5 - CALL .not type=kotlin.Boolean operator=EXCL - $this: GET_VAR x type=kotlin.Boolean operator=null + RETURN type=kotlin.Nothing from='test5(Boolean): Boolean' + CALL 'not(): Boolean' type=kotlin.Boolean operator=EXCL + $this: GET_VAR 'value-parameter x: Boolean' type=kotlin.Boolean operator=null FUN public fun test6(): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test6 + RETURN type=kotlin.Nothing from='test6(): Boolean' CONST Boolean type=kotlin.Boolean value='false' diff --git a/compiler/testData/ir/irText/expressions/smartCasts.txt b/compiler/testData/ir/irText/expressions/smartCasts.txt index 500208e3cec..0c10d305a38 100644 --- a/compiler/testData/ir/irText/expressions/smartCasts.txt +++ b/compiler/testData/ir/irText/expressions/smartCasts.txt @@ -1,55 +1,55 @@ FILE /smartCasts.kt - FUN public fun expectsString(/*0*/ s: kotlin.String): kotlin.Unit + FUN public fun expectsString(s: kotlin.String): kotlin.Unit BLOCK_BODY - FUN public fun expectsInt(/*0*/ i: kotlin.Int): kotlin.Unit + FUN public fun expectsInt(i: kotlin.Int): kotlin.Unit BLOCK_BODY - FUN public fun overloaded(/*0*/ s: kotlin.String): kotlin.String + FUN public fun overloaded(s: kotlin.String): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=overloaded - GET_VAR s type=kotlin.String operator=null - FUN public fun overloaded(/*0*/ x: kotlin.Any): kotlin.Any + RETURN type=kotlin.Nothing from='overloaded(String): String' + GET_VAR 'value-parameter s: String' type=kotlin.String operator=null + FUN public fun overloaded(x: kotlin.Any): kotlin.Any BLOCK_BODY - RETURN type=kotlin.Nothing from=overloaded - GET_VAR x type=kotlin.Any operator=null - FUN public fun test1(/*0*/ x: kotlin.Any): kotlin.Unit + RETURN type=kotlin.Nothing from='overloaded(Any): Any' + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test1(x: kotlin.Any): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=test1 - CALL .println type=kotlin.Unit operator=null - message: CALL . type=kotlin.Int operator=GET_PROPERTY + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='test1(Any): Unit' + CALL 'println(Int): Unit' type=kotlin.Unit operator=null + message: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY $this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - CALL .expectsString type=kotlin.Unit operator=null + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + CALL 'expectsString(String): Unit' type=kotlin.Unit operator=null s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - CALL .expectsInt type=kotlin.Unit operator=null - i: CALL . type=kotlin.Int operator=GET_PROPERTY + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + CALL 'expectsInt(Int): Unit' type=kotlin.Unit operator=null + i: CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY $this: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - CALL .expectsString type=kotlin.Unit operator=null - s: CALL .overloaded type=kotlin.String operator=null + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + CALL 'expectsString(String): Unit' type=kotlin.Unit operator=null + s: CALL 'overloaded(String): String' type=kotlin.String operator=null s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - FUN public fun test2(/*0*/ x: kotlin.Any): kotlin.String + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test2(x: kotlin.Any): kotlin.String BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=test2 + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='test2(Any): String' CONST String type=kotlin.String value='' - RETURN type=kotlin.Nothing from=test2 - CALL .overloaded type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test2(Any): String' + CALL 'overloaded(String): String' type=kotlin.String operator=null s: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - FUN public fun test3(/*0*/ x: kotlin.Any): kotlin.String + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test3(x: kotlin.Any): kotlin.String BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=test3 + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='test3(Any): String' CONST String type=kotlin.String value='' - RETURN type=kotlin.Nothing from=test3 + RETURN type=kotlin.Nothing from='test3(Any): String' TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR x type=kotlin.Any operator=null + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt index 8754bd5869c..f2d8912b955 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt @@ -3,25 +3,25 @@ FILE /smartCastsWithDestructuring.kt CLASS INTERFACE I2 FUN public operator fun I1.component1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=component1 + RETURN type=kotlin.Nothing from='component1() on I1: Int' CONST Int type=kotlin.Int value='1' FUN public operator fun I2.component2(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=component2 + RETURN type=kotlin.Nothing from='component2() on I2: String' CONST String type=kotlin.String value='' - FUN public fun test(/*0*/ x: I1): kotlin.Unit + FUN public fun test(x: I1): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=I2 - GET_VAR x type=I1 operator=null - then: RETURN type=kotlin.Nothing from=test + GET_VAR 'value-parameter x: I1' type=I1 operator=null + then: RETURN type=kotlin.Nothing from='test(I1): Unit' BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION VAR val tmp0_container: I1 - GET_VAR x type=I1 operator=null + GET_VAR 'value-parameter x: I1' type=I1 operator=null VAR val c1: kotlin.Int - CALL .component1 type=kotlin.Int operator=COMPONENT_N(index=1) - $receiver: GET_VAR tmp0_container type=I1 operator=null + CALL 'component1() on I1: Int' type=kotlin.Int operator=COMPONENT_N(index=1) + $receiver: GET_VAR 'tmp0_container: I1' type=I1 operator=null VAR val c2: kotlin.String - CALL .component2 type=kotlin.String operator=COMPONENT_N(index=2) + CALL 'component2() on I2: String' type=kotlin.String operator=COMPONENT_N(index=2) $receiver: TYPE_OP operator=IMPLICIT_CAST typeOperand=I2 - GET_VAR tmp0_container type=I1 operator=null + GET_VAR 'tmp0_container: I1' type=I1 operator=null diff --git a/compiler/testData/ir/irText/expressions/smoke.txt b/compiler/testData/ir/irText/expressions/smoke.txt index 4cab5db661e..6790b485c5b 100644 --- a/compiler/testData/ir/irText/expressions/smoke.txt +++ b/compiler/testData/ir/irText/expressions/smoke.txt @@ -1,7 +1,7 @@ FILE /smoke.kt FUN public fun testFun(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=testFun + RETURN type=kotlin.Nothing from='testFun(): String' CONST String type=kotlin.String value='OK' PROPERTY public val testSimpleVal: kotlin.Int = 1 EXPRESSION_BODY @@ -9,7 +9,7 @@ FILE /smoke.kt PROPERTY public val testValWithGetter: kotlin.Int PROPERTY_GETTER public fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' PROPERTY public var testSimpleVar: kotlin.Int EXPRESSION_BODY @@ -17,7 +17,7 @@ FILE /smoke.kt PROPERTY public var testVarWithAccessors: kotlin.Int PROPERTY_GETTER public fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' - PROPERTY_SETTER public fun (/*0*/ v: kotlin.Int): kotlin.Unit + PROPERTY_SETTER public fun (v: kotlin.Int): kotlin.Unit BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/stringComparisons.txt b/compiler/testData/ir/irText/expressions/stringComparisons.txt index 6e1bd6ff7f2..a8e41b6f241 100644 --- a/compiler/testData/ir/irText/expressions/stringComparisons.txt +++ b/compiler/testData/ir/irText/expressions/stringComparisons.txt @@ -1,29 +1,29 @@ FILE /stringComparisons.kt - FUN public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean + FUN public fun test1(a: kotlin.String, b: kotlin.String): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .GT0 type=kotlin.Boolean operator=GT - arg0: CALL .compareTo type=kotlin.Int operator=GT - $this: GET_VAR a type=kotlin.String operator=null - other: GET_VAR b type=kotlin.String operator=null - FUN public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean + RETURN type=kotlin.Nothing from='test1(String, String): Boolean' + CALL 'GT0(Int): Boolean' type=kotlin.Boolean operator=GT + arg0: CALL 'compareTo(String): Int' type=kotlin.Int operator=GT + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null + other: GET_VAR 'value-parameter b: String' type=kotlin.String operator=null + FUN public fun test2(a: kotlin.String, b: kotlin.String): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR a type=kotlin.String operator=null - other: GET_VAR b type=kotlin.String operator=null - FUN public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean + RETURN type=kotlin.Nothing from='test2(String, String): Boolean' + CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(String): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null + other: GET_VAR 'value-parameter b: String' type=kotlin.String operator=null + FUN public fun test3(a: kotlin.String, b: kotlin.String): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .GTEQ0 type=kotlin.Boolean operator=GTEQ - arg0: CALL .compareTo type=kotlin.Int operator=GTEQ - $this: GET_VAR a type=kotlin.String operator=null - other: GET_VAR b type=kotlin.String operator=null - FUN public fun test4(/*0*/ a: kotlin.String, /*1*/ b: kotlin.String): kotlin.Boolean + RETURN type=kotlin.Nothing from='test3(String, String): Boolean' + CALL 'GTEQ0(Int): Boolean' type=kotlin.Boolean operator=GTEQ + arg0: CALL 'compareTo(String): Int' type=kotlin.Int operator=GTEQ + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null + other: GET_VAR 'value-parameter b: String' type=kotlin.String operator=null + FUN public fun test4(a: kotlin.String, b: kotlin.String): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - CALL .LTEQ0 type=kotlin.Boolean operator=LTEQ - arg0: CALL .compareTo type=kotlin.Int operator=LTEQ - $this: GET_VAR a type=kotlin.String operator=null - other: GET_VAR b type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test4(String, String): Boolean' + CALL 'LTEQ0(Int): Boolean' type=kotlin.Boolean operator=LTEQ + arg0: CALL 'compareTo(String): Int' type=kotlin.Int operator=LTEQ + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null + other: GET_VAR 'value-parameter b: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/stringPlus.txt b/compiler/testData/ir/irText/expressions/stringPlus.txt index 127a6a7d8e9..2f6964cc5da 100644 --- a/compiler/testData/ir/irText/expressions/stringPlus.txt +++ b/compiler/testData/ir/irText/expressions/stringPlus.txt @@ -1,27 +1,27 @@ FILE /stringPlus.kt - FUN public fun test1(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Any): kotlin.String + FUN public fun test1(a: kotlin.String, b: kotlin.Any): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .plus type=kotlin.String operator=PLUS - $this: GET_VAR a type=kotlin.String operator=null - other: GET_VAR b type=kotlin.Any operator=null - FUN public fun test2(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String + RETURN type=kotlin.Nothing from='test1(String, Any): String' + CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null + other: GET_VAR 'value-parameter b: Any' type=kotlin.Any operator=null + FUN public fun test2(a: kotlin.String, b: kotlin.Int): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .plus type=kotlin.String operator=PLUS - $this: CALL .plus type=kotlin.String operator=PLUS - $this: GET_VAR a type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test2(String, Int): String' + CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null other: CONST String type=kotlin.String value='+' - other: GET_VAR b type=kotlin.Int operator=null - FUN public fun test3(/*0*/ a: kotlin.String, /*1*/ b: kotlin.Int): kotlin.String + other: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null + FUN public fun test3(a: kotlin.String, b: kotlin.Int): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .plus type=kotlin.String operator=PLUS - $this: CALL .plus type=kotlin.String operator=PLUS - $this: CALL .plus type=kotlin.String operator=PLUS - $this: GET_VAR a type=kotlin.String operator=null + RETURN type=kotlin.Nothing from='test3(String, Int): String' + CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: CALL 'plus(Any?): String' type=kotlin.String operator=PLUS + $this: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null other: CONST String type=kotlin.String value='+' - other: CALL .plus type=kotlin.Int operator=PLUS - $this: GET_VAR b type=kotlin.Int operator=null + other: CALL 'plus(Int): Int' type=kotlin.Int operator=PLUS + $this: GET_VAR 'value-parameter b: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='1' - other: GET_VAR a type=kotlin.String operator=null + other: GET_VAR 'value-parameter a: String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.txt b/compiler/testData/ir/irText/expressions/stringTemplates.txt index 9f028bcf7a0..16d91036b85 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.txt @@ -1,7 +1,7 @@ FILE /stringTemplates.kt FUN public fun foo(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=foo + RETURN type=kotlin.Nothing from='foo(): String' CONST String type=kotlin.String value='' PROPERTY public val test1: kotlin.String = "" EXPRESSION_BODY @@ -28,6 +28,6 @@ abc PROPERTY public val test6: kotlin.String EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CALL . type=kotlin.String operator=GET_PROPERTY + CALL '(): String' type=kotlin.String operator=GET_PROPERTY CONST String type=kotlin.String value=' ' - CALL .foo type=kotlin.String operator=null + CALL 'foo(): String' type=kotlin.String operator=null diff --git a/compiler/testData/ir/irText/expressions/throw.txt b/compiler/testData/ir/irText/expressions/throw.txt index bb7f30a1a3b..a87f90c2063 100644 --- a/compiler/testData/ir/irText/expressions/throw.txt +++ b/compiler/testData/ir/irText/expressions/throw.txt @@ -2,13 +2,13 @@ FILE /throw.kt FUN public fun test1(): kotlin.Unit BLOCK_BODY THROW type=kotlin.Nothing - CALL . type=kotlin.Throwable operator=null - FUN public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit + CALL 'constructor Throwable()' type=kotlin.Throwable operator=null + FUN public fun testImplicitCast(a: kotlin.Any): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Throwable - GET_VAR a type=kotlin.Any operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null then: BLOCK type=kotlin.Nothing operator=null THROW type=kotlin.Nothing TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Throwable - GET_VAR a type=kotlin.Any operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/expressions/tryCatch.txt b/compiler/testData/ir/irText/expressions/tryCatch.txt index 3728344d651..fe7ba27acf0 100644 --- a/compiler/testData/ir/irText/expressions/tryCatch.txt +++ b/compiler/testData/ir/irText/expressions/tryCatch.txt @@ -3,20 +3,20 @@ FILE /tryCatch.kt BLOCK_BODY TRY_CATCH type=kotlin.Unit try: BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null catch e: BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null finally: BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null FUN public fun test2(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(): Int' TRY_CATCH type=kotlin.Int try: BLOCK type=kotlin.Int operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null CONST Int type=kotlin.Int value='42' catch e: BLOCK type=kotlin.Int operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null CONST Int type=kotlin.Int value='24' finally: BLOCK type=kotlin.Unit operator=null - CALL .println type=kotlin.Unit operator=null + CALL 'println(): Unit' type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt index cffd9212691..f927ba81741 100644 --- a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt @@ -1,14 +1,14 @@ FILE /tryCatchWithImplicitCast.kt - FUN public fun testImplicitCast(/*0*/ a: kotlin.Any): kotlin.Unit + FUN public fun testImplicitCast(a: kotlin.Any): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.String - GET_VAR a type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=testImplicitCast + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='testImplicitCast(Any): Unit' VAR val t: kotlin.String TRY_CATCH type=kotlin.String try: BLOCK type=kotlin.String operator=null TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.String - GET_VAR a type=kotlin.Any operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null catch e: BLOCK type=kotlin.String operator=null CONST String type=kotlin.String value='' diff --git a/compiler/testData/ir/irText/expressions/typeOperators.txt b/compiler/testData/ir/irText/expressions/typeOperators.txt index 781c27def56..f70ab1cbd92 100644 --- a/compiler/testData/ir/irText/expressions/typeOperators.txt +++ b/compiler/testData/ir/irText/expressions/typeOperators.txt @@ -1,22 +1,22 @@ FILE /typeOperators.kt CLASS INTERFACE IThing - FUN public fun test1(/*0*/ x: kotlin.Any): kotlin.Boolean + FUN public fun test1(x: kotlin.Any): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 + RETURN type=kotlin.Nothing from='test1(Any): Boolean' TYPE_OP operator=INSTANCEOF typeOperand=IThing - GET_VAR x type=kotlin.Any operator=null - FUN public fun test2(/*0*/ x: kotlin.Any): kotlin.Boolean + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test2(x: kotlin.Any): kotlin.Boolean BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 + RETURN type=kotlin.Nothing from='test2(Any): Boolean' TYPE_OP operator=NOT_INSTANCEOF typeOperand=IThing - GET_VAR x type=kotlin.Any operator=null - FUN public fun test3(/*0*/ x: kotlin.Any): IThing + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test3(x: kotlin.Any): IThing BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 + RETURN type=kotlin.Nothing from='test3(Any): IThing' TYPE_OP operator=CAST typeOperand=IThing - GET_VAR x type=kotlin.Any operator=null - FUN public fun test4(/*0*/ x: kotlin.Any): IThing? + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null + FUN public fun test4(x: kotlin.Any): IThing? BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 + RETURN type=kotlin.Nothing from='test4(Any): IThing?' TYPE_OP operator=SAFE_CAST typeOperand=IThing - GET_VAR x type=kotlin.Any operator=null + GET_VAR 'value-parameter x: Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/expressions/values.txt b/compiler/testData/ir/irText/expressions/values.txt index d494965b811..f40ab711cfa 100644 --- a/compiler/testData/ir/irText/expressions/values.txt +++ b/compiler/testData/ir/irText/expressions/values.txt @@ -2,45 +2,45 @@ FILE /values.kt CLASS ENUM_CLASS Enum CONSTRUCTOR private constructor Enum() BLOCK_BODY - ENUM_CONSTRUCTOR_CALL Enum super - INSTANCE_INITIALIZER_CALL classDescriptor=Enum + ENUM_CONSTRUCTOR_CALL 'constructor Enum(String, Int)' super + INSTANCE_INITIALIZER_CALL classDescriptor='Enum' ENUM_ENTRY enum entry A - init: ENUM_CONSTRUCTOR_CALL Enum A - FUN public final /*synthesized*/ fun values(): kotlin.Array + init: ENUM_CONSTRUCTOR_CALL 'constructor Enum()' A + FUN public final fun values(): kotlin.Array SYNTHETIC_BODY kind=ENUM_VALUES - FUN public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): Enum + FUN public final fun valueOf(value: kotlin.String): Enum SYNTHETIC_BODY kind=ENUM_VALUEOF CLASS OBJECT A CONSTRUCTOR private constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' PROPERTY public val a: kotlin.Int = 0 EXPRESSION_BODY CONST Int type=kotlin.Int value='0' CLASS CLASS Z CONSTRUCTOR public constructor Z() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Z - CLASS OBJECT Companion + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='Z' + CLASS OBJECT companion object of Z CONSTRUCTOR private constructor Companion() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=Companion + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='companion object of Z' FUN public fun test1(): Enum BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - GET_ENUM_VALUE A type=Enum + RETURN type=kotlin.Nothing from='test1(): Enum' + GET_ENUM_VALUE 'A' type=Enum FUN public fun test2(): A BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - GET_OBJECT A type=A + RETURN type=kotlin.Nothing from='test2(): A' + GET_OBJECT 'A' type=A FUN public fun test3(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL . type=kotlin.Int operator=GET_PROPERTY + RETURN type=kotlin.Nothing from='test3(): Int' + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY FUN public fun test4(): Z.Companion BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 - GET_OBJECT Companion type=Z.Companion + RETURN type=kotlin.Nothing from='test4(): Z.Companion' + GET_OBJECT 'companion object of Z' type=Z.Companion diff --git a/compiler/testData/ir/irText/expressions/vararg.txt b/compiler/testData/ir/irText/expressions/vararg.txt index f613ab5bd96..a8a0d46e67d 100644 --- a/compiler/testData/ir/irText/expressions/vararg.txt +++ b/compiler/testData/ir/irText/expressions/vararg.txt @@ -1,21 +1,21 @@ FILE /vararg.kt PROPERTY public val test1: kotlin.Array EXPRESSION_BODY - CALL .arrayOf type=kotlin.Array operator=null + CALL 'arrayOf(vararg String): Array' type=kotlin.Array operator=null PROPERTY public val test2: kotlin.Array EXPRESSION_BODY - CALL .arrayOf type=kotlin.Array operator=null + 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' PROPERTY public val test3: kotlin.Array EXPRESSION_BODY - CALL .arrayOf type=kotlin.Array operator=null + CALL 'arrayOf(vararg String): Array' type=kotlin.Array operator=null elements: VARARG type=Array varargElementType=String CONST String type=kotlin.String value='0' SPREAD_ELEMENT - CALL . type=kotlin.Array operator=GET_PROPERTY + CALL '(): Array' type=kotlin.Array operator=GET_PROPERTY SPREAD_ELEMENT - CALL . type=kotlin.Array operator=GET_PROPERTY + CALL '(): Array' type=kotlin.Array operator=GET_PROPERTY CONST String type=kotlin.String value='4' diff --git a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt index 15340dc74e2..4b9adb17a22 100644 --- a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt @@ -1,26 +1,26 @@ FILE /varargWithImplicitCast.kt - FUN public fun testScalar(/*0*/ a: kotlin.Any): kotlin.IntArray + FUN public fun testScalar(a: kotlin.Any): kotlin.IntArray BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.Int - GET_VAR a type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=testScalar - CALL .intArrayOf type=kotlin.IntArray operator=null - RETURN type=kotlin.Nothing from=testScalar - CALL .intArrayOf type=kotlin.IntArray operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='testScalar(Any): IntArray' + CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null + RETURN type=kotlin.Nothing from='testScalar(Any): IntArray' + CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null elements: VARARG type=IntArray varargElementType=Int TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Int - GET_VAR a type=kotlin.Any operator=null - FUN public fun testSpread(/*0*/ a: kotlin.Any): kotlin.IntArray + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + FUN public fun testSpread(a: kotlin.Any): kotlin.IntArray BLOCK_BODY WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=kotlin.IntArray - GET_VAR a type=kotlin.Any operator=null - then: RETURN type=kotlin.Nothing from=testSpread - CALL .intArrayOf type=kotlin.IntArray operator=null - RETURN type=kotlin.Nothing from=testSpread - CALL .intArrayOf type=kotlin.IntArray operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null + then: RETURN type=kotlin.Nothing from='testSpread(Any): IntArray' + CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null + RETURN type=kotlin.Nothing from='testSpread(Any): IntArray' + CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray operator=null elements: VARARG type=IntArray varargElementType=Int SPREAD_ELEMENT TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.IntArray - GET_VAR a type=kotlin.Any operator=null + GET_VAR 'value-parameter a: Any' type=kotlin.Any operator=null diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 644a78b5113..81836768ac5 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -1,49 +1,49 @@ FILE /variableAsFunctionCall.kt FUN public fun kotlin.String.k(): () -> kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=k + RETURN type=kotlin.Nothing from='k() on String: () -> String' BLOCK type=() -> kotlin.String operator=LAMBDA FUN local final fun (): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from= - $RECEIVER of: k type=kotlin.String - CALLABLE_REFERENCE type=() -> kotlin.String operator=LAMBDA - FUN public fun test1(/*0*/ f: () -> kotlin.Unit): kotlin.Unit + RETURN type=kotlin.Nothing from='(): String' + $RECEIVER of 'k() on String: () -> String' type=kotlin.String + CALLABLE_REFERENCE '(): String' type=() -> kotlin.String operator=LAMBDA + FUN public fun test1(f: () -> kotlin.Unit): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .invoke type=kotlin.Unit operator=INVOKE - $this: GET_VAR f type=() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION - FUN public fun test2(/*0*/ f: kotlin.String.() -> kotlin.Unit): kotlin.Unit + RETURN type=kotlin.Nothing from='test1(() -> Unit): Unit' + CALL 'invoke(): Unit' type=kotlin.Unit operator=INVOKE + $this: GET_VAR 'value-parameter f: () -> Unit' type=() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION + FUN public fun test2(f: kotlin.String.() -> kotlin.Unit): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from=test2 - CALL .invoke type=kotlin.Unit operator=INVOKE - $this: GET_VAR f type=kotlin.String.() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION + RETURN type=kotlin.Nothing from='test2(String.() -> Unit): Unit' + CALL 'invoke() on String: Unit' type=kotlin.Unit operator=INVOKE + $this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit operator=VARIABLE_AS_FUNCTION $receiver: CONST String type=kotlin.String value='hello' FUN public fun test3(): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test3 - CALL .invoke type=kotlin.String operator=null - $this: CALL .k type=() -> kotlin.String operator=null + RETURN type=kotlin.Nothing from='test3(): String' + CALL 'invoke(): String' type=kotlin.String operator=null + $this: CALL 'k() on String: () -> String' type=() -> kotlin.String operator=null $receiver: CONST String type=kotlin.String value='hello' - FUN public fun test4(/*0*/ ns: kotlin.String?): kotlin.String? + FUN public fun test4(ns: kotlin.String?): kotlin.String? BLOCK_BODY - RETURN type=kotlin.Nothing from=test4 + RETURN type=kotlin.Nothing from='test4(String?): String?' BLOCK type=kotlin.String? operator=SAFE_CALL VAR val tmp1_safe_receiver: (() -> kotlin.String)? BLOCK type=(() -> kotlin.String)? operator=SAFE_CALL VAR val tmp0_safe_receiver: kotlin.String? - GET_VAR ns type=kotlin.String? operator=null + GET_VAR 'value-parameter ns: String?' type=kotlin.String? operator=null WHEN type=(() -> kotlin.String)? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .k type=() -> kotlin.String operator=null - $this: GET_VAR tmp0_safe_receiver type=kotlin.String? operator=null + else: CALL 'k() on String: () -> String' type=() -> kotlin.String operator=null + $this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? operator=null WHEN type=kotlin.String? operator=SAFE_CALL - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp1_safe_receiver type=(() -> kotlin.String)? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST Null type=kotlin.Nothing? value='null' - else: CALL .invoke type=kotlin.String operator=null - $this: GET_VAR tmp1_safe_receiver type=(() -> kotlin.String)? operator=null + else: CALL 'invoke(): String' type=kotlin.String operator=null + $this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? operator=null diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index ccbdb8792fe..1d4a4fc8a16 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -2,98 +2,98 @@ FILE /when.kt CLASS OBJECT A CONSTRUCTOR private constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A - FUN public fun testWithSubject(/*0*/ x: kotlin.Any?): kotlin.String + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' + FUN public fun testWithSubject(x: kotlin.Any?): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=testWithSubject + RETURN type=kotlin.Nothing from='testWithSubject(Any?): String' BLOCK type=kotlin.String operator=WHEN VAR val tmp0_subject: kotlin.Any? - GET_VAR x type=kotlin.Any? operator=null + GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null WHEN type=kotlin.String operator=WHEN - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST String type=kotlin.String value='null' - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Any? operator=null - arg1: GET_OBJECT A type=A + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? operator=null + arg1: GET_OBJECT 'A' type=A then: CONST String type=kotlin.String value='A' if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String - GET_VAR tmp0_subject type=kotlin.Any? operator=null + GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? operator=null then: CONST String type=kotlin.String value='String' - if: CALL .contains type=kotlin.Boolean operator=IN - $receiver: CALL .setOf type=kotlin.collections.Set operator=null - element: GET_VAR tmp0_subject type=kotlin.Any? operator=null + if: CALL 'contains(Any) on Iterable: Boolean' type=kotlin.Boolean operator=IN + $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set operator=null + element: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? operator=null then: CONST String type=kotlin.String value='nothingness?' else: CONST String type=kotlin.String value='something' - FUN public fun test(/*0*/ x: kotlin.Any?): kotlin.String + FUN public fun test(x: kotlin.Any?): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=test + RETURN type=kotlin.Nothing from='test(Any?): String' WHEN type=kotlin.String operator=WHEN - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR x type=kotlin.Any? operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null arg1: CONST Null type=kotlin.Nothing? value='null' then: CONST String type=kotlin.String value='null' - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR x type=kotlin.Any? operator=null - arg1: GET_OBJECT A type=A + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null + arg1: GET_OBJECT 'A' type=A then: CONST String type=kotlin.String value='A' if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.String - GET_VAR x type=kotlin.Any? operator=null + GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null then: CONST String type=kotlin.String value='String' - if: CALL .contains type=kotlin.Boolean operator=IN - $receiver: CALL .setOf type=kotlin.collections.Set operator=null - element: GET_VAR x type=kotlin.Any? operator=null + if: CALL 'contains(Any) on Iterable: Boolean' type=kotlin.Boolean operator=IN + $receiver: CALL 'setOf(): Set' type=kotlin.collections.Set operator=null + element: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? operator=null then: CONST String type=kotlin.String value='nothingness?' else: CONST String type=kotlin.String value='something' - FUN public fun testComma(/*0*/ x: kotlin.Int): kotlin.String + FUN public fun testComma(x: kotlin.Int): kotlin.String BLOCK_BODY - RETURN type=kotlin.Nothing from=testComma + RETURN type=kotlin.Nothing from='testComma(Int): String' BLOCK type=kotlin.String operator=WHEN VAR val tmp0_subject: kotlin.Int - GET_VAR x type=kotlin.Int operator=null + 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 if: WHEN type=kotlin.Boolean operator=WHEN_COMMA if: WHEN type=kotlin.Boolean operator=WHEN_COMMA - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='1' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='2' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='3' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='4' then: CONST String type=kotlin.String value='1234' if: WHEN type=kotlin.Boolean operator=WHEN_COMMA if: WHEN type=kotlin.Boolean operator=WHEN_COMMA - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='5' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='6' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='7' then: CONST String type=kotlin.String value='567' if: WHEN type=kotlin.Boolean operator=WHEN_COMMA - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='8' then: CONST Boolean type=kotlin.Boolean value='true' - else: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR tmp0_subject type=kotlin.Int operator=null + else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='9' then: CONST String type=kotlin.String value='89' else: CONST String type=kotlin.String value='?' diff --git a/compiler/testData/ir/irText/expressions/whenElse.txt b/compiler/testData/ir/irText/expressions/whenElse.txt index e9fef2f5d63..f27f9b6477e 100644 --- a/compiler/testData/ir/irText/expressions/whenElse.txt +++ b/compiler/testData/ir/irText/expressions/whenElse.txt @@ -1,6 +1,6 @@ FILE /whenElse.kt FUN public fun test(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test + RETURN type=kotlin.Nothing from='test(): Int' WHEN type=kotlin.Int operator=WHEN else: CONST Int type=kotlin.Int value='42' diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.txt index 2c5fe0fcdf1..0b2b7a97b00 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.txt @@ -4,64 +4,64 @@ FILE /whileDoWhile.kt VAR var x: kotlin.Int CONST Int type=kotlin.Int value='0' WHILE label=null operator=WHILE_LOOP - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='0' WHILE label=null operator=WHILE_LOOP - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $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 - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null WHILE label=null operator=WHILE_LOOP - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null 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 - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp1 type=kotlin.Int operator=null - GET_VAR tmp1 type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp1: Int' type=kotlin.Int operator=null + GET_VAR 'tmp1: Int' type=kotlin.Int operator=null DO_WHILE label=null operator=DO_WHILE_LOOP - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null 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 - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp2 type=kotlin.Int operator=null - GET_VAR tmp2 type=kotlin.Int operator=null - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + GET_VAR 'tmp2: Int' type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='15' 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 - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp3 type=kotlin.Int operator=null - GET_VAR tmp3 type=kotlin.Int operator=null - condition: CALL .LT0 type=kotlin.Boolean operator=LT - arg0: CALL .compareTo type=kotlin.Int operator=LT - $this: GET_VAR x type=kotlin.Int operator=null + 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 + $this: GET_VAR 'tmp3: Int' type=kotlin.Int operator=null + GET_VAR 'tmp3: Int' type=kotlin.Int operator=null + condition: CALL 'LT0(Int): Boolean' type=kotlin.Boolean operator=LT + arg0: CALL 'compareTo(Int): Int' type=kotlin.Int operator=LT + $this: GET_VAR 'x: Int' type=kotlin.Int operator=null other: CONST Int type=kotlin.Int value='20' FUN public fun testSmartcastInCondition(): kotlin.Unit BLOCK_BODY @@ -69,13 +69,13 @@ FILE /whileDoWhile.kt CONST Null type=kotlin.Nothing? value='null' WHEN type=kotlin.Unit operator=IF if: TYPE_OP operator=INSTANCEOF typeOperand=kotlin.Boolean - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'a: Any?' type=kotlin.Any? operator=null then: BLOCK type=kotlin.Unit operator=null WHILE label=null operator=WHILE_LOOP condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'a: Any?' type=kotlin.Any? operator=null body: BLOCK type=kotlin.Unit operator=null DO_WHILE label=null operator=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit operator=null condition: TYPE_OP operator=IMPLICIT_CAST typeOperand=kotlin.Boolean - GET_VAR a type=kotlin.Any? operator=null + GET_VAR 'a: Any?' type=kotlin.Any? operator=null diff --git a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt index 847308aecf7..cc56e821cb8 100644 --- a/compiler/testData/ir/irText/lambdas/anonymousFunction.txt +++ b/compiler/testData/ir/irText/lambdas/anonymousFunction.txt @@ -4,5 +4,5 @@ FILE /anonymousFunction.kt BLOCK type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION FUN local final fun (): kotlin.Unit BLOCK_BODY - CALL .println type=kotlin.Unit operator=null - CALLABLE_REFERENCE type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION + CALL 'println(): Unit' type=kotlin.Unit operator=null + CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=ANONYMOUS_FUNCTION diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 00e7bccaecc..86adc1124c8 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -1,13 +1,13 @@ FILE /extensionLambda.kt FUN public fun test1(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=test1 - CALL .run type=kotlin.Int operator=null + RETURN type=kotlin.Nothing from='test1(): Int' + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL . type=kotlin.Int operator=GET_PROPERTY - $this: $RECEIVER of: type=kotlin.String - CALLABLE_REFERENCE type=kotlin.String.() -> kotlin.Int operator=LAMBDA + RETURN type=kotlin.Nothing from='() on String: Int' + CALL '(): Int' type=kotlin.Int operator=GET_PROPERTY + $this: $RECEIVER of '() on String: Int' type=kotlin.String + CALLABLE_REFERENCE '() on String: Int' type=kotlin.String.() -> kotlin.Int operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/justLambda.txt b/compiler/testData/ir/irText/lambdas/justLambda.txt index 9b401cc4a04..b94e7ee3084 100644 --- a/compiler/testData/ir/irText/lambdas/justLambda.txt +++ b/compiler/testData/ir/irText/lambdas/justLambda.txt @@ -4,13 +4,13 @@ FILE /justLambda.kt BLOCK type=() -> kotlin.Int operator=LAMBDA FUN local final fun (): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from= + RETURN type=kotlin.Nothing from='(): Int' CONST Int type=kotlin.Int value='42' - CALLABLE_REFERENCE type=() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE '(): Int' type=() -> kotlin.Int operator=LAMBDA PROPERTY public val test2: () -> kotlin.Unit EXPRESSION_BODY BLOCK type=() -> kotlin.Unit operator=LAMBDA FUN local final fun (): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA + RETURN type=kotlin.Nothing from='(): Unit' + CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/localFunction.txt b/compiler/testData/ir/irText/lambdas/localFunction.txt index dc4ae070a91..cabf630232d 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.txt @@ -7,9 +7,9 @@ FILE /localFunction.kt BLOCK_BODY BLOCK type=kotlin.Int operator=POSTFIX_INCR VAR val tmp0: kotlin.Int - GET_VAR x type=kotlin.Int operator=POSTFIX_INCR - SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR - CALL .inc type=kotlin.Int operator=POSTFIX_INCR - $this: GET_VAR tmp0 type=kotlin.Int operator=null - GET_VAR tmp0 type=kotlin.Int operator=null - CALL .local type=kotlin.Unit operator=null + 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 + $this: GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + GET_VAR 'tmp0: Int' type=kotlin.Int operator=null + CALL 'local(): Unit' type=kotlin.Unit operator=null diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 75017a20f76..c9020b2fafb 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -2,49 +2,49 @@ FILE /multipleImplicitReceivers.kt CLASS OBJECT A CONSTRUCTOR private constructor A() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=A + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='A' CLASS OBJECT B CONSTRUCTOR private constructor B() BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL Any - INSTANCE_INITIALIZER_CALL classDescriptor=B + DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' + INSTANCE_INITIALIZER_CALL classDescriptor='B' CLASS INTERFACE IFoo PROPERTY public open val A.foo: B PROPERTY_GETTER public open fun A.(): B BLOCK_BODY - RETURN type=kotlin.Nothing from= - GET_OBJECT B type=B + RETURN type=kotlin.Nothing from='() on A: B' + GET_OBJECT 'B' type=B CLASS INTERFACE IInvoke FUN public open operator fun B.invoke(): kotlin.Int BLOCK_BODY - RETURN type=kotlin.Nothing from=invoke + RETURN type=kotlin.Nothing from='invoke() on B: Int' CONST Int type=kotlin.Int value='42' - FUN public fun test(/*0*/ fooImpl: IFoo, /*1*/ invokeImpl: IInvoke): kotlin.Unit + FUN public fun test(fooImpl: IFoo, invokeImpl: IInvoke): kotlin.Unit BLOCK_BODY - CALL .with type=kotlin.Int operator=null - receiver: GET_OBJECT A type=A + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .with type=kotlin.Int operator=null - receiver: GET_VAR fooImpl type=IFoo operator=null + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .with type=kotlin.Int operator=null - receiver: GET_VAR invokeImpl type=IInvoke operator=null + 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 BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .invoke type=kotlin.Int operator=INVOKE - $this: $RECEIVER of: type=IInvoke - $receiver: CALL . type=B operator=GET_PROPERTY - $this: $RECEIVER of: type=IFoo - $receiver: $RECEIVER of: type=A - CALLABLE_REFERENCE type=IInvoke.() -> kotlin.Int operator=LAMBDA - CALLABLE_REFERENCE type=IFoo.() -> kotlin.Int operator=LAMBDA - CALLABLE_REFERENCE type=A.() -> kotlin.Int operator=LAMBDA + RETURN type=kotlin.Nothing from='() on IInvoke: Int' + CALL 'invoke() on B: Int' type=kotlin.Int operator=INVOKE + $this: $RECEIVER of '() on IInvoke: Int' type=IInvoke + $receiver: CALL '() on A: B' type=B operator=GET_PROPERTY + $this: $RECEIVER of '() on IFoo: Int' type=IFoo + $receiver: $RECEIVER of '() on A: Int' type=A + CALLABLE_REFERENCE '() on IInvoke: Int' type=IInvoke.() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE '() on IFoo: Int' type=IFoo.() -> kotlin.Int operator=LAMBDA + CALLABLE_REFERENCE '() on A: Int' type=A.() -> kotlin.Int operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt index e34370119fe..2bf31170c5b 100644 --- a/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt +++ b/compiler/testData/ir/irText/lambdas/nonLocalReturn.txt @@ -1,57 +1,57 @@ FILE /nonLocalReturn.kt FUN public fun test0(): kotlin.Unit BLOCK_BODY - CALL .run type=kotlin.Nothing operator=null + CALL 'run(() -> Nothing): Nothing' type=kotlin.Nothing operator=null block: BLOCK type=() -> kotlin.Nothing operator=LAMBDA FUN local final fun (): kotlin.Nothing BLOCK_BODY - RETURN type=kotlin.Nothing from=test0 - CALLABLE_REFERENCE type=() -> kotlin.Nothing operator=LAMBDA + RETURN type=kotlin.Nothing from='test0(): Unit' + CALLABLE_REFERENCE '(): Nothing' type=() -> kotlin.Nothing operator=LAMBDA FUN public fun test1(): kotlin.Unit BLOCK_BODY - CALL .run type=kotlin.Unit operator=null + CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null block: BLOCK type=() -> kotlin.Unit operator=LAMBDA FUN local final fun (): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA + RETURN type=kotlin.Nothing from='(): Unit' + CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA FUN public fun test2(): kotlin.Unit BLOCK_BODY - CALL .run type=kotlin.Unit operator=null + CALL 'run(() -> Unit): Unit' type=kotlin.Unit operator=null block: BLOCK type=() -> kotlin.Unit operator=LAMBDA FUN local final fun (): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA - FUN public fun testLrmFoo1(/*0*/ ints: kotlin.collections.List): kotlin.Unit + RETURN type=kotlin.Nothing from='(): Unit' + CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA + FUN public fun testLrmFoo1(ints: kotlin.collections.List): kotlin.Unit BLOCK_BODY - CALL .forEach type=kotlin.Unit operator=null - $receiver: GET_VAR ints type=kotlin.collections.List operator=null + 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 (/*0*/ it: kotlin.Int): kotlin.Unit + FUN local final fun (it: kotlin.Int): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR it type=kotlin.Int operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='0' - then: RETURN type=kotlin.Nothing from= - RETURN type=kotlin.Nothing from= - CALL .print type=kotlin.Unit operator=null - message: GET_VAR it type=kotlin.Int operator=null - CALLABLE_REFERENCE type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA - FUN public fun testLrmFoo2(/*0*/ ints: kotlin.collections.List): kotlin.Unit + then: RETURN type=kotlin.Nothing from='(Int): Unit' + RETURN type=kotlin.Nothing from='(Int): Unit' + CALL 'print(Int): Unit' type=kotlin.Unit operator=null + message: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null + CALLABLE_REFERENCE '(Int): Unit' type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA + FUN public fun testLrmFoo2(ints: kotlin.collections.List): kotlin.Unit BLOCK_BODY - CALL .forEach type=kotlin.Unit operator=null - $receiver: GET_VAR ints type=kotlin.collections.List operator=null + 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 (/*0*/ it: kotlin.Int): kotlin.Unit + FUN local final fun (it: kotlin.Int): kotlin.Unit BLOCK_BODY WHEN type=kotlin.Unit operator=IF - if: CALL .EQEQ type=kotlin.Boolean operator=EQEQ - arg0: GET_VAR it type=kotlin.Int operator=null + if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean operator=EQEQ + arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null arg1: CONST Int type=kotlin.Int value='0' - then: RETURN type=kotlin.Nothing from= - RETURN type=kotlin.Nothing from= - CALL .print type=kotlin.Unit operator=null - message: GET_VAR it type=kotlin.Int operator=null - CALLABLE_REFERENCE type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA + then: RETURN type=kotlin.Nothing from='(Int): Unit' + RETURN type=kotlin.Nothing from='(Int): Unit' + CALL 'print(Int): Unit' type=kotlin.Unit operator=null + message: GET_VAR 'value-parameter it: Int' type=kotlin.Int operator=null + CALLABLE_REFERENCE '(Int): Unit' type=(kotlin.Int) -> kotlin.Unit operator=LAMBDA diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.txt b/compiler/testData/ir/irText/lambdas/samAdapter.txt index ad790d9a226..72aac122f9c 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.txt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.txt @@ -2,13 +2,13 @@ FILE /samAdapter.kt FUN public fun test1(): kotlin.Unit BLOCK_BODY VAR val hello: java.lang.Runnable - CALL .Runnable type=java.lang.Runnable operator=null + CALL 'Runnable(() -> Unit): Runnable' type=java.lang.Runnable operator=null function: BLOCK type=() -> kotlin.Unit operator=LAMBDA FUN local final fun (): kotlin.Unit BLOCK_BODY - RETURN type=kotlin.Nothing from= - CALL .println type=kotlin.Unit operator=null + RETURN type=kotlin.Nothing from='(): Unit' + CALL 'println(Any?): Unit' type=kotlin.Unit operator=null message: CONST String type=kotlin.String value='Hello, world!' - CALLABLE_REFERENCE type=() -> kotlin.Unit operator=LAMBDA - CALL .run type=kotlin.Unit operator=null - $this: GET_VAR hello type=java.lang.Runnable operator=null + CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit operator=LAMBDA + CALL 'run(): Unit' type=kotlin.Unit operator=null + $this: GET_VAR 'hello: Runnable' type=java.lang.Runnable operator=null