psi2ir: Consistently use type unit for statements
These changes allow us to accurately distinguish between statements and expressions in the IR. This also fixes the types of non-exhaustive conditional statements.
This commit is contained in:
committed by
Dmitry Petrov
parent
0da4b06074
commit
af74fd047a
+9
-9
@@ -2,10 +2,10 @@
|
||||
// FUN: toString
|
||||
BB 0
|
||||
CONTENT
|
||||
1 FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
1 FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
2 GET_VAR 'grade: kotlin.String declared in <root>.toString' type=kotlin.String origin=null
|
||||
3 VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.String [val]
|
||||
4 WHEN type=kotlin.Nothing origin=WHEN
|
||||
3 VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.String [val]
|
||||
4 WHEN type=kotlin.Unit origin=WHEN
|
||||
5 GET_VAR 'val tmp0_subject: kotlin.String [val] declared in <root>.toString' type=kotlin.String origin=null
|
||||
6 CONST String type=kotlin.String value="A"
|
||||
OUTGOING -> BB 1, 5
|
||||
@@ -47,7 +47,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="Excellent"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
BB 6
|
||||
INCOMING <- BB 1
|
||||
CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
@@ -55,7 +55,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="Good"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
BB 7
|
||||
INCOMING <- BB 2
|
||||
CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
@@ -63,7 +63,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="Mediocre"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
BB 8
|
||||
INCOMING <- BB 3
|
||||
CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
@@ -71,7 +71,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="Fair"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
BB 9
|
||||
INCOMING <- BB 4
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
@@ -79,7 +79,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="Failure"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
BB 10
|
||||
INCOMING <- BB 4
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
@@ -87,7 +87,7 @@ CONTENT
|
||||
1 CONST String type=kotlin.String value="???"
|
||||
2 RETURN type=kotlin.Nothing from='public final fun toString (grade: kotlin.String): kotlin.String declared in <root>'
|
||||
OUTGOING -> NONE
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
|
||||
// END FUN: toString
|
||||
|
||||
|
||||
+8
-8
@@ -23,15 +23,15 @@ FILE fqName:<root> fileName:/useNextParamInLambda.kt
|
||||
BLOCK_BODY
|
||||
VAR name:result type:kotlin.String [var]
|
||||
CONST String type=kotlin.String value="fail"
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
TRY type=kotlin.Any
|
||||
try: BLOCK type=kotlin.String origin=null
|
||||
TRY type=kotlin.Unit
|
||||
try: BLOCK type=kotlin.Unit origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } [val] declared in <root>.box
|
||||
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
SET_VAR 'var result: kotlin.String [var] declared in <root>.box' type=kotlin.Unit origin=EQ
|
||||
CONST String type=kotlin.String value="OK"
|
||||
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } [val] declared in <root>.box
|
||||
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
SET_VAR 'var result: kotlin.String [var] declared in <root>.box' type=kotlin.Unit origin=EQ
|
||||
CONST String type=kotlin.String value="OK"
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUS
|
||||
$this: CALL 'public final fun f (f1: kotlin.Function0<kotlin.String>, f2: kotlin.Function0<kotlin.String>): kotlin.String declared in <root>' type=kotlin.String origin=null
|
||||
|
||||
@@ -23,8 +23,8 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
VAR FOR_LOOP_VARIABLE name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.IntIterator [val] declared in <root>.testBreakFor' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testBreakFor' type=kotlin.Int origin=null
|
||||
@@ -39,7 +39,7 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testBreakWhile' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=10
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testBreakWhile' type=kotlin.Int origin=null
|
||||
@@ -52,7 +52,7 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
DO_WHILE label=null origin=DO_WHILE_LOOP
|
||||
body: COMPOSITE type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testBreakDoWhile' type=kotlin.Int origin=null
|
||||
@@ -85,8 +85,8 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
VAR FOR_LOOP_VARIABLE name:x type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.IntIterator [val] declared in <root>.testContinueFor' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueFor' type=kotlin.Int origin=null
|
||||
@@ -101,7 +101,7 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueWhile' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=10
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueWhile' type=kotlin.Int origin=null
|
||||
@@ -122,7 +122,7 @@ FILE fqName:<root> fileName:/breakContinueInWhen.kt
|
||||
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PREFIX_INCR
|
||||
$this: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=PREFIX_INCR
|
||||
GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=PREFIX_INCR
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun greater (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=GT
|
||||
arg0: GET_VAR 'var k: kotlin.Int [var] declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
|
||||
|
||||
@@ -9,6 +9,6 @@ FILE fqName:<root> fileName:/catchParameterAccess.kt
|
||||
$this: GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=VARIABLE_AS_FUNCTION
|
||||
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } [val] declared in <root>.test
|
||||
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
THROW type=kotlin.Nothing
|
||||
GET_VAR 'val e: java.lang.Exception{ kotlin.Exception } [val] declared in <root>.test' type=java.lang.Exception{ kotlin.Exception } origin=null
|
||||
|
||||
@@ -13,7 +13,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
BREAK label=null loop.label=null
|
||||
FUN name:testForBreak2 visibility:public modality:FINAL <> (ss:kotlin.collections.List<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List<kotlin.String>
|
||||
@@ -29,7 +29,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
@@ -41,7 +41,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp1_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForBreak2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
BREAK label=OUTER loop.label=OUTER
|
||||
BREAK label=INNER loop.label=INNER
|
||||
BREAK label=null loop.label=INNER
|
||||
@@ -60,7 +60,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue1' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CONTINUE label=null loop.label=null
|
||||
FUN name:testForContinue2 visibility:public modality:FINAL <> (ss:kotlin.collections.List<kotlin.String>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:ss index:0 type:kotlin.collections.List<kotlin.String>
|
||||
@@ -76,7 +76,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s1 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp0_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp1_iterator type:kotlin.collections.Iterator<kotlin.String> [val]
|
||||
CALL 'public abstract fun iterator (): kotlin.collections.Iterator<E of kotlin.collections.List> declared in kotlin.collections.List' type=kotlin.collections.Iterator<kotlin.String> origin=FOR_LOOP_ITERATOR
|
||||
@@ -88,7 +88,7 @@ FILE fqName:<root> fileName:/forWithBreakContinue.kt
|
||||
VAR FOR_LOOP_VARIABLE name:s2 type:kotlin.String [val]
|
||||
CALL 'public abstract fun next (): T of kotlin.collections.Iterator declared in kotlin.collections.Iterator' type=kotlin.String origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp1_iterator: kotlin.collections.Iterator<kotlin.String> [val] declared in <root>.testForContinue2' type=kotlin.collections.Iterator<kotlin.String> origin=null
|
||||
BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CONTINUE label=OUTER loop.label=OUTER
|
||||
CONTINUE label=INNER loop.label=INNER
|
||||
CONTINUE label=null loop.label=INNER
|
||||
|
||||
+16
-16
@@ -36,22 +36,22 @@ FILE fqName:<root> fileName:/ifElseIf.kt
|
||||
FUN name:testEmptyBranches2 visibility:public modality:FINAL <> (flag:kotlin.Boolean) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:flag index:0 type:kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
WHEN type=kotlin.Any origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CONST Boolean type=kotlin.Boolean value=true
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
WHEN type=kotlin.Any origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
|
||||
then: CONST Boolean type=kotlin.Boolean value=true
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'flag: kotlin.Boolean declared in <root>.testEmptyBranches2' type=kotlin.Boolean origin=null
|
||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONST Boolean type=kotlin.Boolean value=true
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
FUN name:testEmptyBranches3 visibility:public modality:FINAL <> (flag:kotlin.Boolean) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:flag index:0 type:kotlin.Boolean
|
||||
BLOCK_BODY
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ FILE fqName:<root> fileName:/throw.kt
|
||||
BRANCH
|
||||
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Throwable
|
||||
GET_VAR 'a: kotlin.Any declared in <root>.testImplicitCast' type=kotlin.Any origin=null
|
||||
then: BLOCK type=kotlin.Nothing origin=null
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
THROW type=kotlin.Nothing
|
||||
TYPE_OP type=kotlin.Throwable origin=IMPLICIT_CAST typeOperand=kotlin.Throwable
|
||||
GET_VAR 'a: kotlin.Any declared in <root>.testImplicitCast' type=kotlin.Any origin=null
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ FILE fqName:<root> fileName:/tryCatch.kt
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
|
||||
CONST Int type=kotlin.Int value=24
|
||||
finally: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
BLOCK type=kotlin.Int origin=null
|
||||
CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
|
||||
finally: BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public final fun println (): kotlin.Unit [inline] declared in kotlin.io' type=kotlin.Unit origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONST Int type=kotlin.Int value=555
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@ FILE fqName:<root> fileName:/whenReturn.kt
|
||||
FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String
|
||||
VALUE_PARAMETER name:grade index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.String [val]
|
||||
GET_VAR 'grade: kotlin.String declared in <root>.toString' type=kotlin.String origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.String [val] declared in <root>.toString' type=kotlin.String origin=null
|
||||
|
||||
@@ -10,10 +10,10 @@ FILE fqName:<root> fileName:/whenReturnUnit.kt
|
||||
block: FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
|
||||
GET_VAR 'x: kotlin.Int declared in <root>.branch' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.Int [val] declared in <root>.branch.<anonymous>' type=kotlin.Int origin=null
|
||||
|
||||
@@ -3,23 +3,25 @@ FILE fqName:<root> fileName:/whenUnusedExpression.kt
|
||||
VALUE_PARAMETER name:b index:0 type:kotlin.Boolean
|
||||
VALUE_PARAMETER name:i index:1 type:kotlin.Int
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
WHEN type=kotlin.Int? origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
|
||||
then: BLOCK type=kotlin.Int? origin=null
|
||||
BLOCK type=kotlin.Int? origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
|
||||
GET_VAR 'i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Int? origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
arg1: 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 Null type=kotlin.Nothing? value=null
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: CONST Null type=kotlin.Nothing? value=null
|
||||
WHEN type=kotlin.Unit origin=IF
|
||||
BRANCH
|
||||
if: GET_VAR 'b: kotlin.Boolean declared in <root>.test' type=kotlin.Boolean origin=null
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
|
||||
GET_VAR 'i: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=0
|
||||
then: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONST Int type=kotlin.Int value=1
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
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 type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CONST Null type=kotlin.Nothing? value=null
|
||||
|
||||
+9
-9
@@ -12,19 +12,19 @@ FILE fqName:<root> fileName:/kt24114.kt
|
||||
WHILE label=null origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value=true
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
|
||||
CALL 'public final fun one (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=1
|
||||
then: BLOCK type=kotlin.Nothing origin=null
|
||||
BLOCK type=kotlin.Nothing origin=WHEN
|
||||
then: BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp1_subject type:kotlin.Int [val]
|
||||
CALL 'public final fun two (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp1_subject: kotlin.Int [val] declared in <root>.test1' type=kotlin.Int origin=null
|
||||
@@ -40,18 +40,18 @@ FILE fqName:<root> fileName:/kt24114.kt
|
||||
WHILE label=null origin=WHILE_LOOP
|
||||
condition: CONST Boolean type=kotlin.Boolean value=true
|
||||
body: BLOCK type=kotlin.Unit origin=null
|
||||
BLOCK type=kotlin.Nothing origin=WHEN
|
||||
BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.Int [val]
|
||||
CALL 'public final fun one (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp0_subject: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
arg1: CONST Int type=kotlin.Int value=1
|
||||
then: BLOCK type=kotlin.Nothing origin=WHEN
|
||||
then: BLOCK type=kotlin.Unit origin=WHEN
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp1_subject type:kotlin.Int [val]
|
||||
CALL 'public final fun two (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
WHEN type=kotlin.Nothing origin=WHEN
|
||||
WHEN type=kotlin.Unit origin=WHEN
|
||||
BRANCH
|
||||
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||
arg0: GET_VAR 'val tmp1_subject: kotlin.Int [val] declared in <root>.test2' type=kotlin.Int origin=null
|
||||
|
||||
Reference in New Issue
Block a user