[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:
Sergej Jaskiewicz
2023-05-15 19:44:19 +02:00
committed by Space Team
parent b8e868caf6
commit fd76a34277
837 changed files with 11643 additions and 11646 deletions
@@ -4,7 +4,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
CONSTRUCTOR visibility:public <> (s:kotlin.String) returnType:<root>.MyContainer [primary]
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyContainer modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:s visibility:public modality:FINAL [var]
FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private
@@ -28,7 +28,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.MyContainer) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.String [operator] declared in <root>.MyContainer'
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.String declared in <root>.MyContainer'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.component1' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.MyContainer, s:kotlin.String) returnType:<root>.MyContainer
@@ -39,7 +39,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.copy' type=<root>.MyContainer origin=null
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun copy (s: kotlin.String): <root>.MyContainer declared in <root>.MyContainer'
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: GET_VAR 's: kotlin.String declared in <root>.MyContainer.copy' type=kotlin.String origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.MyContainer) returnType:kotlin.String
overridden:
@@ -59,12 +59,12 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.MyContainer'
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.hashCode' type=<root>.MyContainer origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.MyContainer, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.MyContainer
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
BLOCK_BODY
@@ -73,28 +73,28 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
arg0: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.equals' type=<root>.MyContainer origin=null
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.MyContainer.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.MyContainer'
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
WHEN type=kotlin.Unit origin=null
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.MyContainer
GET_VAR 'other: kotlin.Any? declared in <root>.MyContainer.equals' type=kotlin.Any? origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.MyContainer'
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=false
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.MyContainer [val]
TYPE_OP type=<root>.MyContainer origin=CAST typeOperand=<root>.MyContainer
GET_VAR 'other: kotlin.Any? declared in <root>.MyContainer.equals' type=kotlin.Any? origin=null
WHEN type=kotlin.Unit origin=null
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.MyContainer declared in <root>.MyContainer.equals' type=<root>.MyContainer origin=null
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:s type:kotlin.String visibility:private' type=kotlin.String origin=null
receiver: GET_VAR 'val tmp_0: <root>.MyContainer [val] declared in <root>.MyContainer.equals' type=<root>.MyContainer origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.MyContainer'
receiver: GET_VAR 'val tmp_0: <root>.MyContainer declared in <root>.MyContainer.equals' type=<root>.MyContainer origin=null
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.MyContainer'
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.MyContainer'
CONST Boolean type=kotlin.Boolean value=true
FUN name:get visibility:public modality:FINAL <> ($receiver:<root>.MyContainer, $context_receiver_0:kotlin.Int, index:kotlin.Int) returnType:kotlin.String? [operator]
contextReceiverParametersCount: 1
@@ -102,7 +102,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int
VALUE_PARAMETER name:index index:1 type:kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>'
WHEN type=kotlin.String? origin=IF
BRANCH
if: WHEN type=kotlin.Boolean origin=ANDAND
@@ -132,18 +132,18 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
BRANCH
if: WHEN type=kotlin.Boolean origin=OROR
BRANCH
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
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 'index: kotlin.Int declared in <root>.set' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=0
then: CONST Boolean type=kotlin.Boolean value=true
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
then: 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 '$context_receiver_0: kotlin.Int declared in <root>.set' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=42
then: RETURN type=kotlin.Nothing from='public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>'
then: RETURN type=kotlin.Nothing from='public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>'
GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit
CALL 'public final fun <set-s> (<set-?>: kotlin.String): kotlin.Unit declared in <root>.MyContainer' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.MyContainer declared in <root>.set' type=<root>.MyContainer origin=null
@@ -151,7 +151,7 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with [inline] declared in kotlin.StandardKt' type=kotlin.String origin=null
CALL 'public final fun with <T, R> (receiver: T of kotlin.StandardKt.with, block: @[ExtensionFunctionType] kotlin.Function1<T of kotlin.StandardKt.with, R of kotlin.StandardKt.with>): R of kotlin.StandardKt.with declared in kotlin.StandardKt' type=kotlin.String origin=null
<T>: kotlin.Int
<R>: kotlin.String
receiver: CONST Int type=kotlin.Int value=42
@@ -160,26 +160,26 @@ FILE fqName:<root> fileName:/arrayAccessOperators.kt
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
VAR name:myContainer type:<root>.MyContainer [val]
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) [primary] declared in <root>.MyContainer' type=<root>.MyContainer origin=null
CONSTRUCTOR_CALL 'public constructor <init> (s: kotlin.String) declared in <root>.MyContainer' type=<root>.MyContainer origin=null
s: CONST String type=kotlin.String value="fail"
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val myContainer: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
CALL 'public final fun set ($context_receiver_0: kotlin.Int, index: kotlin.Int, value: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
value: CONST String type=kotlin.String value="OK"
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.box'
BLOCK type=kotlin.String origin=ELVIS
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val]
CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? [operator] declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer [val] declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.String? declared in <root>' type=kotlin.String? origin=GET_ARRAY_ELEMENT
$receiver: GET_VAR 'val myContainer: <root>.MyContainer declared in <root>.box.<anonymous>' type=<root>.MyContainer origin=null
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
index: CONST Int type=kotlin.Int value=0
WHEN type=kotlin.String 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_1: kotlin.String? [val] declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg0: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
arg1: CONST Null type=kotlin.Nothing? value=null
then: CONST String type=kotlin.String value="fail"
BRANCH
if: CONST Boolean type=kotlin.Boolean value=true
then: GET_VAR 'val tmp_1: kotlin.String? [val] declared in <root>.box.<anonymous>' type=kotlin.String? origin=null
then: GET_VAR 'val tmp_1: kotlin.String? declared in <root>.box.<anonymous>' type=kotlin.String? origin=null