From 8c32719f3d8466aa3cc293d3d8d099f2198d45cc Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Mon, 6 Mar 2017 16:15:20 +0300 Subject: [PATCH] Render 'type' for IrTypeOperatorCall expressions, update testData. --- .../kotlin/ir/util/RenderIrElement.kt | 2 +- compiler/testData/ir/irCfg/loop/digitCount.txt | 2 +- .../testData/ir/irText/classes/dataClasses.txt | 4 ++-- .../declarations/localDelegatedProperties.txt | 10 +++++----- .../expressions/arrayAugmentedAssignment1.txt | 2 +- .../ir/irText/expressions/classReference.txt | 8 ++++---- .../ir/irText/expressions/coercionToUnit.txt | 12 ++++++------ .../expressions/complexAugmentedAssignment.txt | 8 ++++---- .../testData/ir/irText/expressions/elvis.txt | 8 ++++---- .../expressions/implicitCastOnPlatformType.txt | 2 +- .../expressions/jvmStaticFieldReference.txt | 10 +++++----- .../expressions/objectClassReference.txt | 4 ++-- .../primitivesImplicitConversions.txt | 16 ++++++++-------- .../ir/irText/expressions/safeAssignment.txt | 2 +- .../safeCallWithIncrementDecrement.txt | 6 +++--- .../ir/irText/expressions/safeCalls.txt | 4 ++-- .../expressions/setFieldWithImplicitCast.txt | 4 ++-- .../ir/irText/expressions/smartCasts.txt | 18 +++++++++--------- .../smartCastsWithDestructuring.txt | 4 ++-- .../testData/ir/irText/expressions/throw.txt | 4 ++-- .../ir/irText/expressions/tryCatch.txt | 2 +- .../expressions/tryCatchWithImplicitCast.txt | 4 ++-- .../ir/irText/expressions/typeArguments.txt | 4 ++-- .../ir/irText/expressions/typeOperators.txt | 8 ++++---- .../expressions/varargWithImplicitCast.txt | 8 ++++---- .../testData/ir/irText/expressions/when.txt | 4 ++-- .../irText/expressions/whenCoercedToUnit.txt | 2 +- .../ir/irText/expressions/whileDoWhile.txt | 14 +++++++------- .../irText/lambdas/destructuringInLambda.txt | 4 ++-- .../ir/irText/lambdas/localFunction.txt | 2 +- .../lambdas/multipleImplicitReceivers.txt | 2 +- .../ir/irText/regressions/coercionInLoop.txt | 2 +- 32 files changed, 93 insertions(+), 93 deletions(-) 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 13362a30566..fa0e8d42845 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 @@ -141,7 +141,7 @@ class RenderIrElementVisitor : IrElementVisitor { "STRING_CONCATENATION type=${expression.type.render()}" override fun visitTypeOperator(expression: IrTypeOperatorCall, data: Nothing?): String = - "TYPE_OP origin=${expression.operator} typeOperand=${expression.typeOperand.render()}" + "TYPE_OP type=${expression.type.render()} origin=${expression.operator} typeOperand=${expression.typeOperand.render()}" override fun visitWhen(expression: IrWhen, data: Nothing?): String = "WHEN type=${expression.type.render()} origin=${expression.origin}" diff --git a/compiler/testData/ir/irCfg/loop/digitCount.txt b/compiler/testData/ir/irCfg/loop/digitCount.txt index 9b22e08d98c..6ab5aecab3a 100644 --- a/compiler/testData/ir/irCfg/loop/digitCount.txt +++ b/compiler/testData/ir/irCfg/loop/digitCount.txt @@ -29,7 +29,7 @@ CONTENT 2 VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int 3 SET_VAR 'count: Int' type=kotlin.Unit origin=POSTFIX_INCR 4 GET_VAR 'tmp0: Int' type=kotlin.Int origin=null - 5 TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + 5 TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit OUTGOING -> BB 3 When exit: WHEN type=kotlin.Unit origin=null BB 3 diff --git a/compiler/testData/ir/irText/classes/dataClasses.txt b/compiler/testData/ir/irText/classes/dataClasses.txt index e6fe2245874..111610708d8 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.txt @@ -116,12 +116,12 @@ FILE /dataClasses.kt CONST Boolean type=kotlin.Boolean value='true' WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=Test1 + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=Test1 GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: Test1 - TYPE_OP origin=CAST typeOperand=Test1 + TYPE_OP type=Test1 origin=CAST typeOperand=Test1 GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null WHEN type=kotlin.Unit origin=null BRANCH diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt index ecee620a087..31fb59ad532 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.txt @@ -39,26 +39,26 @@ FILE /localDelegatedProperties.kt FUN DELEGATED_PROPERTY_ACCESSOR local final fun (value: kotlin.Int): kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Int' - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Int + TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int CALL 'setValue(Any?, KProperty<*>, Int) on MutableMap: Unit' type=kotlin.Unit origin=null : Int $receiver: GET_VAR '`x$delegate`: HashMap /* = HashMap */' type=kotlin.collections.HashMap /* = java.util.HashMap */ origin=null thisRef: CONST Null type=kotlin.Nothing? value='null' property: CALLABLE_REFERENCE 'x: Int' type=kotlin.reflect.KMutableProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE value: GET_VAR 'value-parameter value: Int' type=kotlin.Int origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '(Int): Int' type=kotlin.Int origin=EQ value: CONST Int type=kotlin.Int value='0' - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int CALL '(): Int' type=kotlin.Int origin=POSTFIX_INCR - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '(Int): Int' type=kotlin.Int origin=POSTFIX_INCR value: CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null GET_VAR 'tmp0: Int' type=kotlin.Int origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '(Int): Int' type=kotlin.Int origin=PLUSEQ value: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUSEQ $this: CALL '(): Int' type=kotlin.Int origin=PLUSEQ diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt index 37b4c7bda41..4623f7c2525 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment1.txt @@ -59,7 +59,7 @@ FILE /arrayAugmentedAssignment1.kt other: CONST Int type=kotlin.Int value='2' FUN public fun testMember(c: C): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp0_array: kotlin.IntArray CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY diff --git a/compiler/testData/ir/irText/expressions/classReference.txt b/compiler/testData/ir/irText/expressions/classReference.txt index 93f03f21cc0..35f960cd982 100644 --- a/compiler/testData/ir/irText/expressions/classReference.txt +++ b/compiler/testData/ir/irText/expressions/classReference.txt @@ -6,15 +6,15 @@ FILE /classReference.kt INSTANCE_INITIALIZER_CALL classDescriptor='A' FUN public fun test(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CLASS_REFERENCE 'A' type=kotlin.reflect.KClass - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit GET_CLASS type=kotlin.reflect.KClass CALL 'constructor A()' type=A origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY $receiver: CLASS_REFERENCE 'A' type=kotlin.reflect.KClass - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY $receiver: GET_CLASS type=kotlin.reflect.KClass CALL 'constructor A()' type=A origin=null diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.txt index 4652d2f293f..f0c65f576a8 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.txt @@ -6,7 +6,7 @@ FILE /coercionToUnit.kt FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun (): kotlin.Unit BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CONST Int type=kotlin.Int value='42' CALLABLE_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA FUN DEFAULT_PROPERTY_ACCESSOR public fun (): () -> kotlin.Unit @@ -15,13 +15,13 @@ FILE /coercionToUnit.kt GET_FIELD 'test1: () -> Unit' type=() -> kotlin.Unit origin=null FUN public fun test2(mc: kotlin.collections.MutableCollection): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'add(String): Boolean' type=kotlin.Boolean origin=null $this: GET_VAR 'value-parameter mc: MutableCollection' type=kotlin.collections.MutableCollection origin=null element: CONST String type=kotlin.String value='' FUN public fun test3(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Unit? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: java.io.PrintStream! GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY @@ -34,10 +34,10 @@ FILE /coercionToUnit.kt BRANCH if: CONST Boolean type=kotlin.Boolean value='true' then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_VAR 'tmp0_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null p0: CONST String type=kotlin.String value='Hello,' - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Unit? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE val tmp1_safe_receiver: java.io.PrintStream! GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY @@ -50,6 +50,6 @@ FILE /coercionToUnit.kt BRANCH if: CONST Boolean type=kotlin.Boolean value='true' then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_VAR 'tmp1_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null p0: CONST String type=kotlin.String value='world!' diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt index 5b2b92b86fb..fc73b4e5291 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.txt @@ -60,7 +60,7 @@ FILE /complexAugmentedAssignment.kt BLOCK_BODY VAR var i: kotlin.Int CONST Int type=kotlin.Int value='0' - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp1_array: kotlin.IntArray GET_VAR 'value-parameter a: IntArray' type=kotlin.IntArray origin=null @@ -84,7 +84,7 @@ FILE /complexAugmentedAssignment.kt GET_VAR 'tmp3: Int' type=kotlin.Int origin=null FUN public fun test2(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp0_this: X1 GET_OBJECT 'X1' type=X1 @@ -97,7 +97,7 @@ FILE /complexAugmentedAssignment.kt : CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'tmp1: Int' type=kotlin.Int origin=null GET_VAR 'tmp1: Int' type=kotlin.Int origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp2_this: X1.X2 GET_OBJECT 'X2' type=X1.X2 @@ -110,7 +110,7 @@ FILE /complexAugmentedAssignment.kt : CALL 'inc(): Int' type=kotlin.Int origin=POSTFIX_INCR $this: GET_VAR 'tmp3: Int' type=kotlin.Int origin=null GET_VAR 'tmp3: Int' type=kotlin.Int origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp4_this: X1.X2.X3 GET_OBJECT 'X3' type=X1.X2.X3 diff --git a/compiler/testData/ir/irText/expressions/elvis.txt b/compiler/testData/ir/irText/expressions/elvis.txt index f0f8fa938cb..f72c3ea6741 100644 --- a/compiler/testData/ir/irText/expressions/elvis.txt +++ b/compiler/testData/ir/irText/expressions/elvis.txt @@ -45,13 +45,13 @@ FILE /elvis.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter b: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' CONST String type=kotlin.String value='' WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String? + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String? GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' CONST String type=kotlin.String value='' @@ -64,11 +64,11 @@ FILE /elvis.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + then: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter b: Any?' type=kotlin.Any? origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value='true' - then: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + then: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null FUN public fun test4(x: kotlin.Any): kotlin.Any BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt index e9255759ec4..6b36a3949c0 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt @@ -2,6 +2,6 @@ FILE /implicitCastOnPlatformType.kt FUN public fun test(): kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='test(): String' - TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=kotlin.String + TYPE_OP type=kotlin.String origin=IMPLICIT_NOTNULL typeOperand=kotlin.String CALL 'getProperty(String!): String!' type=kotlin.String! origin=null p0: CONST String type=kotlin.String value='test' diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt index d00140c9a2c..53d7f68bb51 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt @@ -2,14 +2,14 @@ FILE /jvmStaticFieldReference.kt FUN public fun testFun(): kotlin.Unit BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='testFun' PROPERTY public var testProp: kotlin.Any FUN public fun (): kotlin.Any BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='testProp/get' RETURN type=kotlin.Nothing from='(): Any' @@ -17,7 +17,7 @@ FILE /jvmStaticFieldReference.kt FUN public fun (value: kotlin.Any): kotlin.Unit BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='testProp/set' CLASS CLASS TestClass @@ -33,7 +33,7 @@ FILE /jvmStaticFieldReference.kt if: CONST Boolean type=kotlin.Boolean value='true' then: BLOCK type=kotlin.Int origin=null CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='TestClass/test' CONST Int type=kotlin.Int value='42' @@ -45,6 +45,6 @@ FILE /jvmStaticFieldReference.kt ANONYMOUS_INITIALIZER TestClass BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null - $this: TYPE_OP origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream + $this: TYPE_OP type=java.io.PrintStream origin=IMPLICIT_NOTNULL typeOperand=java.io.PrintStream GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY p0: CONST String type=kotlin.String value='TestClass/init' diff --git a/compiler/testData/ir/irText/expressions/objectClassReference.txt b/compiler/testData/ir/irText/expressions/objectClassReference.txt index ba6bc0771be..f4ff0f9fbff 100644 --- a/compiler/testData/ir/irText/expressions/objectClassReference.txt +++ b/compiler/testData/ir/irText/expressions/objectClassReference.txt @@ -6,8 +6,8 @@ FILE /objectClassReference.kt INSTANCE_INITIALIZER_CALL classDescriptor='A' FUN public fun test(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CLASS_REFERENCE 'A' type=kotlin.reflect.KClass - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL '() on KClass: Class' type=java.lang.Class origin=GET_PROPERTY $receiver: CLASS_REFERENCE 'A' type=kotlin.reflect.KClass diff --git a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt index c07d580a404..1c67af7d048 100644 --- a/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt +++ b/compiler/testData/ir/irText/expressions/primitivesImplicitConversions.txt @@ -26,7 +26,7 @@ FILE /primitivesImplicitConversions.kt PROPERTY public val test4: kotlin.Long = -42.toLong() FIELD PROPERTY_BACKING_FIELD public val test4: kotlin.Long = -42.toLong() EXPRESSION_BODY - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long + TYPE_OP type=kotlin.Long origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='42' FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Long @@ -36,7 +36,7 @@ FILE /primitivesImplicitConversions.kt PROPERTY public val test5: kotlin.Short = -42.toShort() FIELD PROPERTY_BACKING_FIELD public val test5: kotlin.Short = -42.toShort() EXPRESSION_BODY - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Short + TYPE_OP type=kotlin.Short origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Short CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='42' FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Short @@ -46,7 +46,7 @@ FILE /primitivesImplicitConversions.kt PROPERTY public val test6: kotlin.Byte = -42.toByte() FIELD PROPERTY_BACKING_FIELD public val test6: kotlin.Byte = -42.toByte() EXPRESSION_BODY - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Byte + TYPE_OP type=kotlin.Byte origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Byte CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='42' FUN DEFAULT_PROPERTY_ACCESSOR public fun (): kotlin.Byte @@ -64,27 +64,27 @@ FILE /primitivesImplicitConversions.kt VAR val test4: kotlin.Long? = -1.toLong() CONST Long type=kotlin.Long value='-1' VAR val test5: kotlin.Long? = -1.toLong() - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long + TYPE_OP type=kotlin.Long? origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='1' VAR val test6: kotlin.Short? = -1.toShort() - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Short + TYPE_OP type=kotlin.Short? origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Short CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='1' VAR val test7: kotlin.Byte? = -1.toByte() - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Byte + TYPE_OP type=kotlin.Byte? origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Byte CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='1' FUN public fun testImplicitArguments(x: kotlin.Long = ...): kotlin.Unit x: EXPRESSION_BODY - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long + TYPE_OP type=kotlin.Long origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='1' BLOCK_BODY CLASS CLASS TestImplicitArguments CONSTRUCTOR public constructor TestImplicitArguments(x: kotlin.Long = ...) x: EXPRESSION_BODY - TYPE_OP origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long + TYPE_OP type=kotlin.Long origin=IMPLICIT_INTEGER_COERCION typeOperand=kotlin.Long CALL 'unaryMinus(): Int' type=kotlin.Int origin=null $this: CONST Int type=kotlin.Int value='1' BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/safeAssignment.txt b/compiler/testData/ir/irText/expressions/safeAssignment.txt index 5b2ee6a3d16..8aec87aa003 100644 --- a/compiler/testData/ir/irText/expressions/safeAssignment.txt +++ b/compiler/testData/ir/irText/expressions/safeAssignment.txt @@ -28,7 +28,7 @@ FILE /safeAssignment.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CONST Null type=kotlin.Nothing? value='null' BRANCH if: CONST Boolean type=kotlin.Boolean value='true' diff --git a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt index 531ca051a14..a0fd02db78a 100644 --- a/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt +++ b/compiler/testData/ir/irText/expressions/safeCallWithIncrementDecrement.txt @@ -43,11 +43,11 @@ FILE /safeCallWithIncrementDecrement.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CONST Null type=kotlin.Nothing? value='null' BRANCH if: CONST Boolean type=kotlin.Boolean value='true' - then: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp1_receiver: test.C? GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null @@ -62,7 +62,7 @@ FILE /safeCallWithIncrementDecrement.kt GET_VAR 'tmp2: Int' type=kotlin.Int origin=null FUN public fun testArrayAccess(nc: test.C?): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp3_array: kotlin.Int? BLOCK type=kotlin.Int? origin=SAFE_CALL diff --git a/compiler/testData/ir/irText/expressions/safeCalls.txt b/compiler/testData/ir/irText/expressions/safeCalls.txt index a93f48657ea..4c6b538678c 100644 --- a/compiler/testData/ir/irText/expressions/safeCalls.txt +++ b/compiler/testData/ir/irText/expressions/safeCalls.txt @@ -83,7 +83,7 @@ FILE /safeCalls.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_safe_receiver: Ref?' type=Ref? origin=null arg1: CONST Null type=kotlin.Nothing? value='null' - then: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CONST Null type=kotlin.Nothing? value='null' BRANCH if: CONST Boolean type=kotlin.Boolean value='true' @@ -113,7 +113,7 @@ FILE /safeCalls.kt CONST Int type=kotlin.Int value='239' FUN public fun box(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Int CONST Int type=kotlin.Int value='42' diff --git a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt index 5eeba394f40..3b7264d9f75 100644 --- a/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/setFieldWithImplicitCast.txt @@ -8,10 +8,10 @@ FILE /Derived.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null then: BLOCK type=kotlin.Unit origin=null SET_FIELD 'value: String!' type=kotlin.Unit origin=EQ receiver: GET_VAR '' type=Derived origin=null - value: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String! + value: TYPE_OP type=kotlin.String! origin=IMPLICIT_CAST typeOperand=kotlin.String! GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCasts.txt b/compiler/testData/ir/irText/expressions/smartCasts.txt index 7f1f46165b5..49f9ff1f5d3 100644 --- a/compiler/testData/ir/irText/expressions/smartCasts.txt +++ b/compiler/testData/ir/irText/expressions/smartCasts.txt @@ -15,45 +15,45 @@ FILE /smartCasts.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='test1(Any): Unit' GET_OBJECT 'Unit' type=kotlin.Unit CALL 'println(Int): Unit' type=kotlin.Unit origin=null message: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY - $this: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + $this: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null CALL 'expectsString(String): Unit' type=kotlin.Unit origin=null - s: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null CALL 'expectsInt(Int): Unit' type=kotlin.Unit origin=null i: CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY - $this: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + $this: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null CALL 'expectsString(String): Unit' type=kotlin.Unit origin=null s: CALL 'overloaded(String): String' type=kotlin.String origin=null - s: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null FUN public fun test2(x: kotlin.Any): kotlin.String BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='test2(Any): String' CONST String type=kotlin.String value='' RETURN type=kotlin.Nothing from='test2(Any): String' CALL 'overloaded(String): String' type=kotlin.String origin=null - s: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null FUN public fun test3(x: kotlin.Any): kotlin.String BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='test3(Any): String' CONST String type=kotlin.String value='' RETURN type=kotlin.Nothing from='test3(Any): String' - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt index a55bd06595a..692f6dc7543 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt @@ -13,7 +13,7 @@ FILE /smartCastsWithDestructuring.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=I2 + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=I2 GET_VAR 'value-parameter x: I1' type=I1 origin=null then: RETURN type=kotlin.Nothing from='test(I1): Unit' GET_OBJECT 'Unit' type=kotlin.Unit @@ -25,5 +25,5 @@ FILE /smartCastsWithDestructuring.kt $receiver: GET_VAR 'tmp0_container: I1' type=I1 origin=null VAR val c2: kotlin.String CALL 'component2() on I2: String' type=kotlin.String origin=COMPONENT_N(index=2) - $receiver: TYPE_OP origin=IMPLICIT_CAST typeOperand=I2 + $receiver: TYPE_OP type=I2 origin=IMPLICIT_CAST typeOperand=I2 GET_VAR 'tmp0_container: I1' type=I1 origin=null diff --git a/compiler/testData/ir/irText/expressions/throw.txt b/compiler/testData/ir/irText/expressions/throw.txt index 491c3a95388..889ddcebb28 100644 --- a/compiler/testData/ir/irText/expressions/throw.txt +++ b/compiler/testData/ir/irText/expressions/throw.txt @@ -7,9 +7,9 @@ FILE /throw.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.Throwable + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Throwable GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null then: BLOCK type=kotlin.Nothing origin=null THROW type=kotlin.Nothing - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Throwable + TYPE_OP type=kotlin.Throwable origin=IMPLICIT_CAST typeOperand=kotlin.Throwable GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/tryCatch.txt b/compiler/testData/ir/irText/expressions/tryCatch.txt index ac39072fd73..a68c436cda0 100644 --- a/compiler/testData/ir/irText/expressions/tryCatch.txt +++ b/compiler/testData/ir/irText/expressions/tryCatch.txt @@ -20,7 +20,7 @@ FILE /tryCatch.kt BLOCK type=kotlin.Int origin=null CALL 'println(): Unit' type=kotlin.Unit origin=null CONST Int type=kotlin.Int value='24' - finally: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + finally: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=null CALL 'println(): Unit' type=kotlin.Unit origin=null CONST Int type=kotlin.Int value='555' diff --git a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt index 548b788ee57..4d0961bab9e 100644 --- a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt @@ -3,14 +3,14 @@ FILE /tryCatchWithImplicitCast.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='testImplicitCast(Any): Unit' GET_OBJECT 'Unit' type=kotlin.Unit VAR val t: kotlin.String TRY type=kotlin.String try: BLOCK type=kotlin.String origin=null - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String + TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null CATCH parameter=e: Throwable BLOCK type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/typeArguments.txt b/compiler/testData/ir/irText/expressions/typeArguments.txt index 7cea1e6a5cc..396538b88b5 100644 --- a/compiler/testData/ir/irText/expressions/typeArguments.txt +++ b/compiler/testData/ir/irText/expressions/typeArguments.txt @@ -4,11 +4,11 @@ FILE /typeArguments.kt RETURN type=kotlin.Nothing from='test1(Any): Boolean' WHEN type=kotlin.Boolean origin=ANDAND BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.Array<*> + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Array<*> GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: CALL 'isArrayOf() on Array<*>: Boolean' type=kotlin.Boolean origin=null : String - $receiver: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Array<*> + $receiver: TYPE_OP type=kotlin.Array<*> origin=IMPLICIT_CAST typeOperand=kotlin.Array<*> GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null BRANCH if: CONST Boolean type=kotlin.Boolean value='true' diff --git a/compiler/testData/ir/irText/expressions/typeOperators.txt b/compiler/testData/ir/irText/expressions/typeOperators.txt index 5a9e05e25c7..26a1acf7d1b 100644 --- a/compiler/testData/ir/irText/expressions/typeOperators.txt +++ b/compiler/testData/ir/irText/expressions/typeOperators.txt @@ -3,20 +3,20 @@ FILE /typeOperators.kt FUN public fun test1(x: kotlin.Any): kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='test1(Any): Boolean' - TYPE_OP origin=INSTANCEOF typeOperand=IThing + TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=IThing GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null FUN public fun test2(x: kotlin.Any): kotlin.Boolean BLOCK_BODY RETURN type=kotlin.Nothing from='test2(Any): Boolean' - TYPE_OP origin=NOT_INSTANCEOF typeOperand=IThing + TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=IThing GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null FUN public fun test3(x: kotlin.Any): IThing BLOCK_BODY RETURN type=kotlin.Nothing from='test3(Any): IThing' - TYPE_OP origin=CAST typeOperand=IThing + TYPE_OP type=IThing origin=CAST typeOperand=IThing GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null FUN public fun test4(x: kotlin.Any): IThing? BLOCK_BODY RETURN type=kotlin.Nothing from='test4(Any): IThing?' - TYPE_OP origin=SAFE_CAST typeOperand=IThing + TYPE_OP type=IThing? origin=SAFE_CAST typeOperand=IThing GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt index e56bd94edcb..c872d4e556f 100644 --- a/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/varargWithImplicitCast.txt @@ -3,20 +3,20 @@ FILE /varargWithImplicitCast.kt BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.Int + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Int GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='testScalar(Any): IntArray' CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null RETURN type=kotlin.Nothing from='testScalar(Any): IntArray' CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null elements: VARARG type=IntArray varargElementType=Int - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Int + TYPE_OP type=kotlin.Int origin=IMPLICIT_CAST typeOperand=kotlin.Int GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null FUN public fun testSpread(a: kotlin.Any): kotlin.IntArray BLOCK_BODY WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=kotlin.IntArray + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.IntArray GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='testSpread(Any): IntArray' CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null @@ -24,5 +24,5 @@ FILE /varargWithImplicitCast.kt CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null elements: VARARG type=IntArray varargElementType=Int SPREAD_ELEMENT - TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.IntArray + TYPE_OP type=kotlin.IntArray origin=IMPLICIT_CAST typeOperand=kotlin.IntArray GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index 576aec23443..6f143e2db8d 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -22,7 +22,7 @@ FILE /when.kt arg1: GET_OBJECT 'A' type=A then: CONST String type=kotlin.String value='A' BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value='String' BRANCH @@ -50,7 +50,7 @@ FILE /when.kt arg1: GET_OBJECT 'A' type=A then: CONST String type=kotlin.String value='A' BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value='String' BRANCH diff --git a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.txt b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.txt index bb01f0a90a5..bd87f8227d2 100644 --- a/compiler/testData/ir/irText/expressions/whenCoercedToUnit.txt +++ b/compiler/testData/ir/irText/expressions/whenCoercedToUnit.txt @@ -9,5 +9,5 @@ FILE /whenCoercedToUnit.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value='0' - then: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CONST Int type=kotlin.Int value='0' diff --git a/compiler/testData/ir/irText/expressions/whileDoWhile.txt b/compiler/testData/ir/irText/expressions/whileDoWhile.txt index 620fb9b4a5b..f518f41c73f 100644 --- a/compiler/testData/ir/irText/expressions/whileDoWhile.txt +++ b/compiler/testData/ir/irText/expressions/whileDoWhile.txt @@ -13,7 +13,7 @@ FILE /whileDoWhile.kt arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=LT $this: GET_VAR 'x: Int' type=kotlin.Int origin=null other: CONST Int type=kotlin.Int value='5' - body: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int origin=POSTFIX_INCR @@ -26,7 +26,7 @@ FILE /whileDoWhile.kt arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=LT $this: GET_VAR 'x: Int' type=kotlin.Int origin=null other: CONST Int type=kotlin.Int value='10' - body: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=null BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp1: kotlin.Int @@ -41,7 +41,7 @@ FILE /whileDoWhile.kt $this: GET_VAR 'x: Int' type=kotlin.Int origin=null other: CONST Int type=kotlin.Int value='0' DO_WHILE label=null origin=DO_WHILE_LOOP - body: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int origin=POSTFIX_INCR @@ -55,7 +55,7 @@ FILE /whileDoWhile.kt other: CONST Int type=kotlin.Int value='15' DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit origin=null - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp3: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int origin=POSTFIX_INCR @@ -73,14 +73,14 @@ FILE /whileDoWhile.kt CONST Null type=kotlin.Nothing? value='null' WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.Boolean + if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Boolean GET_VAR 'a: Any?' type=kotlin.Any? origin=null then: BLOCK type=kotlin.Unit origin=null WHILE label=null origin=WHILE_LOOP - condition: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Boolean + condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean GET_VAR 'a: Any?' type=kotlin.Any? origin=null body: BLOCK type=kotlin.Unit origin=null DO_WHILE label=null origin=DO_WHILE_LOOP body: BLOCK type=kotlin.Unit origin=null - condition: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Boolean + condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean GET_VAR 'a: Any?' type=kotlin.Any? origin=null diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt index abd16a0eb4c..e869a7879fb 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt @@ -86,12 +86,12 @@ FILE /destructuringInLambda.kt CONST Boolean type=kotlin.Boolean value='true' WHEN type=kotlin.Unit origin=null BRANCH - if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=A + if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=A GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean' CONST Boolean type=kotlin.Boolean value='false' VAR IR_TEMPORARY_VARIABLE val tmp0_other_with_cast: A - TYPE_OP origin=CAST typeOperand=A + TYPE_OP type=A origin=CAST typeOperand=A GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null WHEN type=kotlin.Unit origin=null BRANCH diff --git a/compiler/testData/ir/irText/lambdas/localFunction.txt b/compiler/testData/ir/irText/lambdas/localFunction.txt index d00a95bd0ef..e6a5c592041 100644 --- a/compiler/testData/ir/irText/lambdas/localFunction.txt +++ b/compiler/testData/ir/irText/lambdas/localFunction.txt @@ -5,7 +5,7 @@ FILE /localFunction.kt CONST Int type=kotlin.Int value='0' FUN local final fun local(): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=POSTFIX_INCR VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int GET_VAR 'x: Int' type=kotlin.Int origin=POSTFIX_INCR diff --git a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt index 8cf1be99015..dce5838fa0a 100644 --- a/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt +++ b/compiler/testData/ir/irText/lambdas/multipleImplicitReceivers.txt @@ -22,7 +22,7 @@ FILE /multipleImplicitReceivers.kt CONST Int type=kotlin.Int value='42' FUN public fun test(fooImpl: IFoo, invokeImpl: IInvoke): kotlin.Unit BLOCK_BODY - TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit CALL 'with(A, A.() -> Int): Int' type=kotlin.Int origin=null : A : Int diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.txt index 73fddff0538..6ab5c305d00 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.txt @@ -12,7 +12,7 @@ FILE /coercionInLoop.kt WHILE label=null origin=WHILE_LOOP condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=null $this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null - body: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit + body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit BLOCK type=kotlin.Int origin=null WHEN type=kotlin.Unit origin=null BRANCH