[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.
This commit is contained in:
committed by
Space Team
parent
b8e868caf6
commit
fd76a34277
@@ -17,7 +17,7 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
FUN name:takeString visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:s index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun forEach <T> (action: kotlin.Function1<T of kotlin.collections.CollectionsKt.forEach, kotlin.Unit>): kotlin.Unit [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||
CALL 'public final fun forEach <T> (action: kotlin.Function1<T of kotlin.collections.CollectionsKt.forEach, kotlin.Unit>): kotlin.Unit declared in kotlin.collections.CollectionsKt' type=kotlin.Unit origin=null
|
||||
<T>: kotlin.String
|
||||
$receiver: CALL 'public final fun split (vararg delimiters: kotlin.String, ignoreCase: kotlin.Boolean, limit: kotlin.Int): kotlin.collections.List<kotlin.String> declared in kotlin.text.StringsKt' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
$receiver: GET_VAR 's: kotlin.String declared in <root>.takeString' type=kotlin.String origin=null
|
||||
@@ -29,7 +29,7 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=PLUSEQ
|
||||
CALL 'public final fun <set-result> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
|
||||
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
|
||||
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
|
||||
$this: CALL 'public final fun <get-result> (): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
|
||||
other: BLOCK type=kotlin.Int origin=ELVIS
|
||||
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val]
|
||||
@@ -38,12 +38,12 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
WHEN type=kotlin.Int origin=null
|
||||
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 tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
arg0: GET_VAR 'val tmp_0: kotlin.Int? declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
arg1: CONST Null type=kotlin.Nothing? value=null
|
||||
then: CONST Int type=kotlin.Int value=0
|
||||
BRANCH
|
||||
if: CONST Boolean type=kotlin.Boolean value=true
|
||||
then: GET_VAR 'val tmp_0: kotlin.Int? [val] declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
then: GET_VAR 'val tmp_0: kotlin.Int? declared in <root>.takeString.<anonymous>' type=kotlin.Int? origin=null
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:x type:kotlin.Int [val]
|
||||
@@ -54,47 +54,47 @@ FILE fqName:<root> fileName:/noSymbolForIntRangeIterator.kt
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val x: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
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>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
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>.test.localFunc' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
VAR name:s type:kotlin.String [val]
|
||||
CALL 'public final fun buildString (builderAction: @[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder{ kotlin.text.StringBuilder }, kotlin.Unit>): kotlin.String [inline] declared in kotlin.text.StringsKt' type=kotlin.String origin=null
|
||||
CALL 'public final fun buildString (builderAction: @[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder{ kotlin.text.StringBuilder }, kotlin.Unit>): kotlin.String declared in kotlin.text.StringsKt' type=kotlin.String origin=null
|
||||
builderAction: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<java.lang.StringBuilder{ kotlin.text.StringBuilder }, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:java.lang.StringBuilder{ kotlin.text.StringBuilder }) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:$this$buildString type:java.lang.StringBuilder{ kotlin.text.StringBuilder }
|
||||
BLOCK_BODY
|
||||
BLOCK type=kotlin.Unit origin=FOR_LOOP
|
||||
VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.IntIterator [val]
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator [fake_override,operator] declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange [operator] declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR
|
||||
$this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE
|
||||
$this: CONST Int type=kotlin.Int value=0
|
||||
other: GET_VAR 'val y: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val y: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
|
||||
WHILE label=null origin=FOR_LOOP_INNER_WHILE
|
||||
condition: CALL 'public abstract fun hasNext (): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
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_2: kotlin.collections.IntIterator declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE
|
||||
VAR FOR_LOOP_VARIABLE name:j type:kotlin.Int [val]
|
||||
CALL 'public final fun next (): kotlin.Int [operator] declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT
|
||||
$this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator declared in <root>.test.localFunc.<anonymous>' type=kotlin.collections.IntIterator origin=null
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public final fun appendLine (value: kotlin.String?): java.lang.StringBuilder{ kotlin.text.StringBuilder } [inline] declared in kotlin.text.StringsKt' type=java.lang.StringBuilder{ kotlin.text.StringBuilder } origin=null
|
||||
CALL 'public final fun appendLine (value: kotlin.String?): java.lang.StringBuilder{ kotlin.text.StringBuilder } declared in kotlin.text.StringsKt' type=java.lang.StringBuilder{ kotlin.text.StringBuilder } origin=null
|
||||
$receiver: GET_VAR '$this$buildString: java.lang.StringBuilder{ kotlin.text.StringBuilder } declared in <root>.test.localFunc.<anonymous>' type=java.lang.StringBuilder{ kotlin.text.StringBuilder } origin=null
|
||||
value: STRING_CONCATENATION type=kotlin.String
|
||||
CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int [val] declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int [val] declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MUL
|
||||
$this: GET_VAR 'val i: kotlin.Int declared in <root>.test.localFunc' type=kotlin.Int origin=null
|
||||
other: GET_VAR 'val j: kotlin.Int declared in <root>.test.localFunc.<anonymous>' type=kotlin.Int origin=null
|
||||
CALL 'public final fun takeString (s: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=null
|
||||
s: GET_VAR 'val s: kotlin.String [val] declared in <root>.test.localFunc' type=kotlin.String origin=null
|
||||
s: GET_VAR 'val s: kotlin.String declared in <root>.test.localFunc' type=kotlin.String origin=null
|
||||
CALL 'local final fun localFunc (): kotlin.Unit declared in <root>.test' type=kotlin.Unit origin=null
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
|
||||
Reference in New Issue
Block a user