Refactor IrWhen.
This commit is contained in:
+38
-33
@@ -99,45 +99,50 @@ FILE /dataClasses.kt
|
||||
FUN GENERATED_DATA_CLASS_MEMBER public open override fun equals(other: kotlin.Any?): kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: THIS of 'Test1' type=Test1
|
||||
arg1: 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='true'
|
||||
BRANCH
|
||||
if: CALL 'EQEQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQEQ
|
||||
arg0: THIS of 'Test1' type=Test1
|
||||
arg1: 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='true'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
if: TYPE_OP 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'
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
GET_VAR 'value-parameter other: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-x>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-y>(): String' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: THIS of 'Test1' type=Test1
|
||||
arg1: CALL '<get-z>(): Any' type=kotlin.Any origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_other_with_cast: Test1' type=Test1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='false'
|
||||
RETURN type=kotlin.Nothing from='equals(Any?): Boolean'
|
||||
CONST Boolean type=kotlin.Boolean value='true'
|
||||
|
||||
+25
-16
@@ -6,11 +6,14 @@ FILE /bangbang.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_notnull: kotlin.Any?
|
||||
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Any origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
|
||||
else: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_notnull: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test2(a: kotlin.Any?): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(Any?): Int'
|
||||
@@ -20,15 +23,21 @@ FILE /bangbang.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Any?
|
||||
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Int origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
|
||||
else: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CALL 'THROW_NPE(): Nothing' type=kotlin.Nothing origin=EXCLEXCL
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp1_notnull: Int?' type=kotlin.Int? origin=null
|
||||
|
||||
@@ -3,16 +3,22 @@ FILE /booleanOperators.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(Boolean, Boolean): Boolean'
|
||||
WHEN type=kotlin.Boolean origin=ANDAND
|
||||
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
|
||||
then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
else: CONST Boolean type=kotlin.Boolean value='false'
|
||||
BRANCH
|
||||
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
|
||||
then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST Boolean type=kotlin.Boolean value='false'
|
||||
FUN public fun test2(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(Boolean, Boolean): Boolean'
|
||||
WHEN type=kotlin.Boolean origin=OROR
|
||||
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
BRANCH
|
||||
if: GET_VAR 'value-parameter a: Boolean' type=kotlin.Boolean origin=null
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'value-parameter b: Boolean' type=kotlin.Boolean origin=null
|
||||
FUN public fun test1x(a: kotlin.Boolean, b: kotlin.Boolean): kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1x(Boolean, Boolean): Boolean'
|
||||
|
||||
@@ -9,11 +9,14 @@ FILE /breakContinueInLoopHeader.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean?
|
||||
GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? origin=null
|
||||
WHEN type=kotlin.Boolean origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: BREAK label=null loop.label=L
|
||||
else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: BREAK label=null loop.label=L
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
FUN public fun test2(c: kotlin.Boolean?): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
@@ -24,11 +27,14 @@ FILE /breakContinueInLoopHeader.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Boolean?
|
||||
GET_VAR 'value-parameter c: Boolean?' type=kotlin.Boolean? origin=null
|
||||
WHEN type=kotlin.Boolean origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONTINUE label=null loop.label=L
|
||||
else: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONTINUE label=null loop.label=L
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Boolean?' type=kotlin.Boolean? origin=null
|
||||
FUN public fun test3(ss: kotlin.collections.List<kotlin.String>?): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHILE label=L origin=WHILE_LOOP
|
||||
@@ -41,11 +47,14 @@ FILE /breakContinueInLoopHeader.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>?
|
||||
GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
WHEN type=kotlin.collections.List<kotlin.String> origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONTINUE label=null loop.label=L
|
||||
else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONTINUE label=null loop.label=L
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
@@ -65,11 +74,14 @@ FILE /breakContinueInLoopHeader.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.collections.List<kotlin.String>?
|
||||
GET_VAR 'value-parameter ss: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
WHEN type=kotlin.collections.List<kotlin.String> origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: BREAK label=null loop.label=L
|
||||
else: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: BREAK label=null loop.label=L
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: List<String>?' type=kotlin.collections.List<kotlin.String>? origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'hasNext(): Boolean' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'tmp1_iterator: Iterator<String>' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
|
||||
+36
-24
@@ -25,30 +25,42 @@ FILE /chainOfSafeCalls.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: C?
|
||||
GET_VAR 'value-parameter nc: C?' type=C? origin=null
|
||||
WHEN type=C? origin=SAFE_CALL
|
||||
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: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
|
||||
BRANCH
|
||||
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: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
|
||||
WHEN type=C? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'bar(): C?' type=C? origin=null
|
||||
$this: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'bar(): C?' type=C? origin=null
|
||||
$this: GET_VAR 'tmp1_safe_receiver: C?' type=C? origin=null
|
||||
WHEN type=C? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp2_safe_receiver: C?' type=C? origin=null
|
||||
WHEN type=C? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'foo(): C' type=C origin=null
|
||||
$this: GET_VAR 'tmp3_safe_receiver: C?' type=C? origin=null
|
||||
|
||||
+22
-16
@@ -26,24 +26,30 @@ FILE /coercionToUnit.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: java.io.PrintStream!
|
||||
GET_FIELD 'out: PrintStream!' type=java.io.PrintStream! origin=GET_PROPERTY
|
||||
WHEN type=kotlin.Unit? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
|
||||
$this: TYPE_OP 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,'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
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
|
||||
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
|
||||
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
|
||||
WHEN type=kotlin.Unit? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'println(String!): Unit' type=kotlin.Unit origin=null
|
||||
$this: TYPE_OP 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!'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
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
|
||||
GET_VAR 'tmp1_safe_receiver: PrintStream!' type=java.io.PrintStream! origin=null
|
||||
p0: CONST String type=kotlin.String value='world!'
|
||||
|
||||
@@ -11,9 +11,12 @@ FILE /dotQualified.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter s: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
|
||||
+54
-37
@@ -18,11 +18,14 @@ FILE /elvis.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any?
|
||||
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Any origin=null
|
||||
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: GET_VAR 'value-parameter b: Any' type=kotlin.Any origin=null
|
||||
else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
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: GET_VAR 'value-parameter b: Any' type=kotlin.Any origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test2(a: kotlin.String?, b: kotlin.Any): kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(String?, Any): Any'
|
||||
@@ -30,35 +33,43 @@ FILE /elvis.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.String?
|
||||
GET_VAR 'value-parameter a: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Any origin=null
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: GET_VAR 'value-parameter b: Any' type=kotlin.Any origin=null
|
||||
else: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: GET_VAR 'value-parameter b: Any' type=kotlin.Any origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: String?' type=kotlin.String? origin=null
|
||||
FUN public fun test3(a: kotlin.Any?, b: kotlin.Any?): kotlin.String
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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=IF
|
||||
if: TYPE_OP 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=''
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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?
|
||||
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=''
|
||||
RETURN type=kotlin.Nothing from='test3(Any?, Any?): String'
|
||||
BLOCK type=kotlin.String origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any?
|
||||
GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.String origin=null
|
||||
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
|
||||
GET_VAR 'value-parameter b: Any?' type=kotlin.Any? origin=null
|
||||
else: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String
|
||||
GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
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
|
||||
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
|
||||
GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test4(x: kotlin.Any): kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test4(Any): Any'
|
||||
@@ -66,11 +77,14 @@ FILE /elvis.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any?
|
||||
CALL '<get-p>(): Any?' type=kotlin.Any? origin=GET_PROPERTY
|
||||
WHEN type=kotlin.Any origin=null
|
||||
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: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
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: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test5(x: kotlin.Any): kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test5(Any): Any'
|
||||
@@ -78,8 +92,11 @@ FILE /elvis.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_elvis_lhs: kotlin.Any?
|
||||
CALL 'foo(): Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Any origin=null
|
||||
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: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
else: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
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: GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null
|
||||
|
||||
+15
-11
@@ -3,14 +3,18 @@ FILE /ifElseIf.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(Int): Int'
|
||||
WHEN type=kotlin.Int origin=WHEN
|
||||
if: CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
||||
arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
|
||||
$this: GET_VAR 'value-parameter i: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='0'
|
||||
then: CONST Int type=kotlin.Int value='1'
|
||||
if: CALL 'LT0(Int): Boolean' type=kotlin.Boolean origin=LT
|
||||
arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=LT
|
||||
$this: GET_VAR 'value-parameter i: Int' type=kotlin.Int origin=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'
|
||||
BRANCH
|
||||
if: CALL 'GT0(Int): Boolean' type=kotlin.Boolean origin=GT
|
||||
arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=GT
|
||||
$this: GET_VAR 'value-parameter i: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='0'
|
||||
then: CONST Int type=kotlin.Int value='1'
|
||||
BRANCH
|
||||
if: CALL 'LT0(Int): Boolean' type=kotlin.Boolean origin=LT
|
||||
arg0: CALL 'compareTo(Int): Int' type=kotlin.Int origin=LT
|
||||
$this: GET_VAR 'value-parameter i: Int' type=kotlin.Int origin=null
|
||||
other: CONST Int type=kotlin.Int value='0'
|
||||
then: CONST Int type=kotlin.Int value='-1'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST Int type=kotlin.Int value='0'
|
||||
|
||||
@@ -29,12 +29,14 @@ FILE /jvmStaticFieldReference.kt
|
||||
FIELD PROPERTY_BACKING_FIELD public final val test: kotlin.Int
|
||||
EXPRESSION_BODY
|
||||
WHEN type=kotlin.Int origin=WHEN
|
||||
else: 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
|
||||
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'
|
||||
BRANCH
|
||||
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
|
||||
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'
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-test>(): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='<get-test>(): Int'
|
||||
|
||||
+11
-8
@@ -24,11 +24,14 @@ FILE /safeAssignment.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: C?
|
||||
GET_VAR 'value-parameter nc: C?' type=C? origin=null
|
||||
WHEN type=kotlin.Unit origin=SAFE_CALL
|
||||
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
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
|
||||
<set-?>: CONST Int type=kotlin.Int value='42'
|
||||
BRANCH
|
||||
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
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL '<set-x>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=C? origin=null
|
||||
<set-?>: CONST Int type=kotlin.Int value='42'
|
||||
|
||||
+37
-28
@@ -18,12 +18,15 @@ FILE /safeCallWithIncrementDecrement.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.Int?
|
||||
$RECEIVER of 'inc() on Int?: Int?' type=kotlin.Int?
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'inc(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'inc(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Int?' type=kotlin.Int? origin=null
|
||||
FUN public operator fun kotlin.Int?.get(index: kotlin.Int): kotlin.Int
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='get(Int) on Int?: Int'
|
||||
@@ -36,24 +39,27 @@ FILE /safeCallWithIncrementDecrement.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: test.C?
|
||||
GET_VAR 'value-parameter nc: C?' type=test.C? origin=null
|
||||
WHEN type=kotlin.Unit origin=SAFE_CALL
|
||||
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
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
else: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp1_this: test.C?
|
||||
GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null
|
||||
BRANCH
|
||||
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
|
||||
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
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int
|
||||
CALL '<get-p>() on C?: Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp1_this: test.C?
|
||||
GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp2: kotlin.Int
|
||||
CALL '<get-p>() on C?: Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
$this: GET_VAR 'tmp1_this: C?' type=test.C? origin=null
|
||||
CALL '<set-p>(Int) on C?: Unit' type=kotlin.Unit origin=POSTFIX_INCR
|
||||
$this: GET_VAR 'tmp1_this: C?' type=test.C? origin=null
|
||||
CALL '<set-p>(Int) on C?: Unit' type=kotlin.Unit origin=POSTFIX_INCR
|
||||
$this: GET_VAR 'tmp1_this: C?' type=test.C? origin=null
|
||||
value: CALL 'inc() on Int?: Int?' type=kotlin.Int? origin=POSTFIX_INCR
|
||||
$receiver: GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
|
||||
GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
|
||||
value: CALL 'inc() on Int?: Int?' type=kotlin.Int? origin=POSTFIX_INCR
|
||||
$receiver: GET_VAR 'tmp2: Int' type=kotlin.Int origin=null
|
||||
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
|
||||
@@ -63,12 +69,15 @@ FILE /safeCallWithIncrementDecrement.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: test.C?
|
||||
GET_VAR 'value-parameter nc: C?' type=test.C? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
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: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL '<get-p>() on C?: Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null
|
||||
BRANCH
|
||||
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: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL '<get-p>() on C?: Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: C?' type=test.C? origin=null
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp4_index0: kotlin.Int
|
||||
CONST Int type=kotlin.Int value='0'
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp5: kotlin.Int
|
||||
|
||||
+49
-34
@@ -31,12 +31,15 @@ FILE /safeCalls.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter x: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
FUN public fun test2(x: kotlin.String?): kotlin.Int?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test2(String?): Int?'
|
||||
@@ -44,12 +47,15 @@ FILE /safeCalls.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter x: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'hashCode(): Int' type=kotlin.Int origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
FUN public fun test3(x: kotlin.String?, y: kotlin.Any?): kotlin.Boolean?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test3(String?, Any?): Boolean?'
|
||||
@@ -57,27 +63,33 @@ FILE /safeCalls.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter x: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Boolean? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'equals(Any?): Boolean' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
other: GET_VAR 'value-parameter y: Any?' type=kotlin.Any? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'equals(Any?): Boolean' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
other: GET_VAR 'value-parameter y: Any?' type=kotlin.Any? origin=null
|
||||
FUN public fun test4(x: Ref?): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=SAFE_CALL
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: Ref?
|
||||
GET_VAR 'value-parameter x: Ref?' type=Ref? origin=null
|
||||
WHEN type=kotlin.Unit origin=SAFE_CALL
|
||||
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
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL '<set-value>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Ref?' type=Ref? origin=null
|
||||
<set-?>: CONST Int type=kotlin.Int value='0'
|
||||
BRANCH
|
||||
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
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL '<set-value>(Int): Unit' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'tmp0_safe_receiver: Ref?' type=Ref? origin=null
|
||||
<set-?>: CONST Int type=kotlin.Int value='0'
|
||||
FUN public fun IHost.test5(s: kotlin.String?): kotlin.Int?
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test5(String?) on IHost: Int?'
|
||||
@@ -85,10 +97,13 @@ FILE /safeCalls.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter s: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.Int? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'extLength() on String: Int' type=kotlin.Int origin=null
|
||||
$this: $RECEIVER of 'test5(String?) on IHost: Int?' type=IHost
|
||||
$receiver: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'extLength() on String: Int' type=kotlin.Int origin=null
|
||||
$this: $RECEIVER of 'test5(String?) on IHost: Int?' type=IHost
|
||||
$receiver: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
|
||||
@@ -6,11 +6,12 @@ FILE /Derived.kt
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='Derived'
|
||||
FUN public final fun setValue(v: kotlin.Any): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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: THIS of 'Derived' type=Derived
|
||||
value: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String!
|
||||
GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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: THIS of 'Derived' type=Derived
|
||||
value: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String!
|
||||
GET_VAR 'value-parameter v: Any' type=kotlin.Any origin=null
|
||||
|
||||
+17
-14
@@ -13,10 +13,11 @@ FILE /smartCasts.kt
|
||||
GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
FUN public fun test1(x: kotlin.Any): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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'
|
||||
CALL 'println(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: CALL '<get-length>(): Int' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.String
|
||||
@@ -34,22 +35,24 @@ FILE /smartCasts.kt
|
||||
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=IF
|
||||
if: TYPE_OP 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=''
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
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=IF
|
||||
if: TYPE_OP 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=''
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
|
||||
@@ -11,10 +11,11 @@ FILE /smartCastsWithDestructuring.kt
|
||||
CONST String type=kotlin.String value=''
|
||||
FUN public fun test(x: I1): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=I2
|
||||
GET_VAR 'value-parameter x: I1' type=I1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='test(I1): Unit'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP origin=NOT_INSTANCEOF typeOperand=I2
|
||||
GET_VAR 'value-parameter x: I1' type=I1 origin=null
|
||||
then: RETURN type=kotlin.Nothing from='test(I1): Unit'
|
||||
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_container: I1
|
||||
GET_VAR 'value-parameter x: I1' type=I1 origin=null
|
||||
|
||||
+8
-7
@@ -5,10 +5,11 @@ FILE /throw.kt
|
||||
CALL 'constructor Throwable()' type=kotlin.Throwable origin=null
|
||||
FUN public fun testImplicitCast(a: kotlin.Any): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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
|
||||
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
GET_VAR 'value-parameter a: Any' type=kotlin.Any origin=null
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
FILE /tryCatchWithImplicitCast.kt
|
||||
FUN public fun testImplicitCast(a: kotlin.Any): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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'
|
||||
VAR val t: kotlin.String
|
||||
TRY type=kotlin.String
|
||||
try: BLOCK type=kotlin.String origin=null
|
||||
|
||||
@@ -3,10 +3,13 @@ FILE /typeArguments.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test1(Any): Boolean'
|
||||
WHEN type=kotlin.Boolean origin=ANDAND
|
||||
if: TYPE_OP 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
|
||||
<reified T : Any>: String
|
||||
$receiver: TYPE_OP origin=IMPLICIT_CAST typeOperand=kotlin.Array<*>
|
||||
BRANCH
|
||||
if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.Array<*>
|
||||
GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null
|
||||
else: CONST Boolean type=kotlin.Boolean value='false'
|
||||
then: CALL 'isArrayOf() on Array<*>: Boolean' type=kotlin.Boolean origin=null
|
||||
<reified T : Any>: String
|
||||
$receiver: TYPE_OP 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'
|
||||
then: CONST Boolean type=kotlin.Boolean value='false'
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
FILE /varargWithImplicitCast.kt
|
||||
FUN public fun testScalar(a: kotlin.Any): kotlin.IntArray
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
@@ -13,11 +14,12 @@ FILE /varargWithImplicitCast.kt
|
||||
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=IF
|
||||
if: TYPE_OP 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
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
RETURN type=kotlin.Nothing from='testSpread(Any): IntArray'
|
||||
CALL 'intArrayOf(vararg Int): IntArray' type=kotlin.IntArray origin=null
|
||||
elements: VARARG type=IntArray varargElementType=Int
|
||||
|
||||
@@ -34,16 +34,22 @@ FILE /variableAsFunctionCall.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_safe_receiver: kotlin.String?
|
||||
GET_VAR 'value-parameter ns: String?' type=kotlin.String? origin=null
|
||||
WHEN type=(() -> kotlin.String)? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null
|
||||
$this: GET_VAR 'tmp0_safe_receiver: String?' type=kotlin.String? origin=null
|
||||
WHEN type=kotlin.String? origin=SAFE_CALL
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
else: CALL 'invoke(): String' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST Null type=kotlin.Nothing? value='null'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CALL 'invoke(): String' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'tmp1_safe_receiver: (() -> String)?' type=(() -> kotlin.String)? origin=null
|
||||
|
||||
+109
-74
@@ -11,46 +11,58 @@ FILE /when.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_subject: kotlin.Any?
|
||||
GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.String origin=WHEN
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST String type=kotlin.String value='null'
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
arg1: GET_OBJECT 'A' type=A
|
||||
then: CONST String type=kotlin.String value='A'
|
||||
if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String
|
||||
GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='String'
|
||||
if: CALL 'contains(Any) on Iterable<Any>: Boolean' type=kotlin.Boolean origin=IN
|
||||
<T>: Any
|
||||
$receiver: CALL 'setOf(): Set<Nothing>' type=kotlin.collections.Set<kotlin.Nothing> origin=null
|
||||
<T>: Nothing
|
||||
element: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='nothingness?'
|
||||
else: CONST String type=kotlin.String value='something'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST String type=kotlin.String value='null'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
arg1: GET_OBJECT 'A' type=A
|
||||
then: CONST String type=kotlin.String value='A'
|
||||
BRANCH
|
||||
if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String
|
||||
GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='String'
|
||||
BRANCH
|
||||
if: CALL 'contains(Any) on Iterable<Any>: Boolean' type=kotlin.Boolean origin=IN
|
||||
<T>: Any
|
||||
$receiver: CALL 'setOf(): Set<Nothing>' type=kotlin.collections.Set<kotlin.Nothing> origin=null
|
||||
<T>: Nothing
|
||||
element: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='nothingness?'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST String type=kotlin.String value='something'
|
||||
FUN public fun test(x: kotlin.Any?): kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(Any?): String'
|
||||
WHEN type=kotlin.String origin=WHEN
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST String type=kotlin.String value='null'
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
arg1: GET_OBJECT 'A' type=A
|
||||
then: CONST String type=kotlin.String value='A'
|
||||
if: TYPE_OP origin=INSTANCEOF typeOperand=kotlin.String
|
||||
GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='String'
|
||||
if: CALL 'contains(Any) on Iterable<Any>: Boolean' type=kotlin.Boolean origin=IN
|
||||
<T>: Any
|
||||
$receiver: CALL 'setOf(): Set<Nothing>' type=kotlin.collections.Set<kotlin.Nothing> origin=null
|
||||
<T>: Nothing
|
||||
element: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='nothingness?'
|
||||
else: CONST String type=kotlin.String value='something'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value='null'
|
||||
then: CONST String type=kotlin.String value='null'
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
arg1: GET_OBJECT 'A' type=A
|
||||
then: CONST String type=kotlin.String value='A'
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
if: CALL 'contains(Any) on Iterable<Any>: Boolean' type=kotlin.Boolean origin=IN
|
||||
<T>: Any
|
||||
$receiver: CALL 'setOf(): Set<Nothing>' type=kotlin.collections.Set<kotlin.Nothing> origin=null
|
||||
<T>: Nothing
|
||||
element: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null
|
||||
then: CONST String type=kotlin.String value='nothingness?'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST String type=kotlin.String value='something'
|
||||
FUN public fun testComma(x: kotlin.Int): kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='testComma(Int): String'
|
||||
@@ -58,46 +70,69 @@ FILE /when.kt
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0_subject: kotlin.Int
|
||||
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.String origin=WHEN
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
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='1'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='2'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='3'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='4'
|
||||
then: CONST String type=kotlin.String value='1234'
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
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='5'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='6'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='7'
|
||||
then: CONST String type=kotlin.String value='567'
|
||||
BRANCH
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
BRANCH
|
||||
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='1'
|
||||
arg1: CONST Int type=kotlin.Int value='8'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: 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='2'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: 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='3'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: 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='4'
|
||||
then: CONST String type=kotlin.String value='1234'
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
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='5'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: 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='6'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: 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='7'
|
||||
then: CONST String type=kotlin.String value='567'
|
||||
if: WHEN type=kotlin.Boolean origin=WHEN_COMMA
|
||||
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='8'
|
||||
then: CONST Boolean type=kotlin.Boolean value='true'
|
||||
else: 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='9'
|
||||
then: CONST String type=kotlin.String value='89'
|
||||
else: CONST String type=kotlin.String value='?'
|
||||
arg1: CONST Int type=kotlin.Int value='9'
|
||||
then: CONST String type=kotlin.String value='89'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST String type=kotlin.String value='?'
|
||||
|
||||
+3
-1
@@ -3,4 +3,6 @@ FILE /whenElse.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='test(): Int'
|
||||
WHEN type=kotlin.Int origin=WHEN
|
||||
else: CONST Int type=kotlin.Int value='42'
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value='true'
|
||||
then: CONST Int type=kotlin.Int value='42'
|
||||
|
||||
+13
-12
@@ -71,15 +71,16 @@ FILE /whileDoWhile.kt
|
||||
BLOCK_BODY
|
||||
VAR val a: kotlin.Any? = null
|
||||
CONST Null type=kotlin.Nothing? value='null'
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: TYPE_OP 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
|
||||
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
|
||||
GET_VAR 'a: Any?' type=kotlin.Any? origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: TYPE_OP 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
|
||||
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
|
||||
GET_VAR 'a: Any?' type=kotlin.Any? origin=null
|
||||
|
||||
+12
-10
@@ -34,11 +34,12 @@ FILE /nonLocalReturn.kt
|
||||
action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(it: kotlin.Int): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
@@ -51,11 +52,12 @@ FILE /nonLocalReturn.kt
|
||||
action: BLOCK type=(kotlin.Int) -> kotlin.Unit origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA local final fun <anonymous>(it: kotlin.Int): kotlin.Unit
|
||||
BLOCK_BODY
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value='0'
|
||||
then: RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
RETURN type=kotlin.Nothing from='<anonymous>(Int): Unit'
|
||||
CALL 'print(Int): Unit' type=kotlin.Unit origin=null
|
||||
message: GET_VAR 'value-parameter it: Int' type=kotlin.Int origin=null
|
||||
|
||||
+13
-12
@@ -14,18 +14,19 @@ FILE /coercionInLoop.kt
|
||||
$this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
||||
body: TYPE_OP origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'get(Int): Double' type=kotlin.Double origin=GET_ARRAY_ELEMENT
|
||||
$this: GET_VAR 'a: DoubleArray' type=kotlin.DoubleArray origin=null
|
||||
index: GET_VAR 'i: Int' type=kotlin.Int origin=null
|
||||
arg1: CALL 'next(): Double' type=kotlin.Double origin=null
|
||||
$this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
||||
then: RETURN type=kotlin.Nothing from='box(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value='Fail '
|
||||
GET_VAR 'i: Int' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||
arg0: CALL 'get(Int): Double' type=kotlin.Double origin=GET_ARRAY_ELEMENT
|
||||
$this: GET_VAR 'a: DoubleArray' type=kotlin.DoubleArray origin=null
|
||||
index: GET_VAR 'i: Int' type=kotlin.Int origin=null
|
||||
arg1: CALL 'next(): Double' type=kotlin.Double origin=null
|
||||
$this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null
|
||||
then: RETURN type=kotlin.Nothing from='box(): String'
|
||||
STRING_CONCATENATION type=kotlin.String
|
||||
CONST String type=kotlin.String value='Fail '
|
||||
GET_VAR 'i: Int' type=kotlin.Int origin=null
|
||||
BLOCK type=kotlin.Int origin=POSTFIX_INCR
|
||||
VAR IR_TEMPORARY_VARIABLE val tmp0: kotlin.Int
|
||||
GET_VAR 'i: Int' type=kotlin.Int origin=POSTFIX_INCR
|
||||
|
||||
Reference in New Issue
Block a user