Files
kotlin-fork/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt
T
Sergej Jaskiewicz fd76a34277 [IR] Don't print flags in declaration references in irText tests
This doesn't reduce the quality of tests, because the flags are still
printed for declarations themselves. We only omit them in references.

However, this makes the tests more compatible with non-JVM backends
(see KT-58605), because flags of referenced stdlib declarations may
differ among target platforms.
2023-05-30 17:26:30 +00:00

144 lines
12 KiB
Plaintext
Vendored

FILE fqName:<root> fileName:/breakContinueInWhen.kt
FUN name:testBreakFor visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:xs type:kotlin.IntArray [val]
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
size: CONST Int type=kotlin.Int value=10
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (i: kotlin.Int): kotlin.Int declared in <root>.testBreakFor'
GET_VAR 'i: kotlin.Int declared in <root>.testBreakFor.<anonymous>' type=kotlin.Int origin=null
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val]
CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
$this: GET_VAR 'val xs: kotlin.IntArray declared in <root>.testBreakFor' type=kotlin.IntArray origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator declared in <root>.testBreakFor' type=kotlin.collections.IntIterator origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
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 tmp_0: kotlin.collections.IntIterator declared in <root>.testBreakFor' type=kotlin.collections.IntIterator 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 declared in <root>.testBreakFor' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: BREAK label=null loop.label=null
FUN name:testBreakWhile visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
WHILE label=null origin=WHILE_LOOP
condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: GET_VAR 'var k: kotlin.Int declared in <root>.testBreakWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=10
body: 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 declared in <root>.testBreakWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: BREAK label=null loop.label=null
FUN name:testBreakDoWhile visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: 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 declared in <root>.testBreakDoWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: BREAK label=null loop.label=null
condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: GET_VAR 'var k: kotlin.Int declared in <root>.testBreakDoWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=10
FUN name:testContinueFor visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:xs type:kotlin.IntArray [val]
CONSTRUCTOR_CALL 'public constructor <init> (size: kotlin.Int, init: kotlin.Function1<kotlin.Int, kotlin.Int>) declared in kotlin.IntArray' type=kotlin.IntArray origin=null
size: CONST Int type=kotlin.Int value=10
init: FUN_EXPR type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=LAMBDA
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (i:kotlin.Int) returnType:kotlin.Int
VALUE_PARAMETER name:i index:0 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='local final fun <anonymous> (i: kotlin.Int): kotlin.Int declared in <root>.testContinueFor'
GET_VAR 'i: kotlin.Int declared in <root>.testContinueFor.<anonymous>' type=kotlin.Int origin=null
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
BLOCK type=kotlin.Unit origin=FOR_LOOP
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val]
CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=null
$this: GET_VAR 'val xs: kotlin.IntArray declared in <root>.testContinueFor' type=kotlin.IntArray origin=null
WHILE label=null origin=FOR_LOOP_INNER_WHILE
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator declared in <root>.testContinueFor' type=kotlin.collections.IntIterator origin=null
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
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 tmp_1: kotlin.collections.IntIterator declared in <root>.testContinueFor' type=kotlin.collections.IntIterator 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 declared in <root>.testContinueFor' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: CONTINUE label=null loop.label=null
FUN name:testContinueWhile visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
WHILE label=null origin=WHILE_LOOP
condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: GET_VAR 'var k: kotlin.Int declared in <root>.testContinueWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=10
body: 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 declared in <root>.testContinueWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: CONTINUE label=null loop.label=null
FUN name:testContinueDoWhile visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
VAR name:k type:kotlin.Int [var]
CONST Int type=kotlin.Int value=0
VAR name:s type:kotlin.String [var]
CONST String type=kotlin.String value=""
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=DO_WHILE_LOOP
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=null
SET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Unit origin=PREFIX_INCR
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
GET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Int 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 declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=2
then: CONTINUE label=null loop.label=null
SET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null
$this: GET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.String origin=null
other: STRING_CONCATENATION type=kotlin.String
GET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
CONST String type=kotlin.String value=";"
condition: CALL 'public final fun less (arg0: kotlin.Int, arg1: kotlin.Int): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=LT
arg0: GET_VAR 'var k: kotlin.Int declared in <root>.testContinueDoWhile' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=10
WHEN type=kotlin.Unit origin=IF
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
arg0: GET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.String origin=null
arg1: CONST String type=kotlin.String value="1;2;"
then: THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> (p0: @[FlexibleNullability] kotlin.Any?) declared in java.lang.AssertionError' type=java.lang.AssertionError origin=null
p0: GET_VAR 'var s: kotlin.String declared in <root>.testContinueDoWhile' type=kotlin.String origin=null