[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
@@ -6,7 +6,7 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
VALUE_PARAMETER name:i index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,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:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
@@ -26,26 +26,26 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
VALUE_PARAMETER name:i index:0 type:kotlin.Int
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in <root>.IFoo
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
overridden:
public open fun hashCode (): kotlin.Int [fake_override] declared in <root>.IFoo
public open fun hashCode (): kotlin.Int declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
overridden:
public open fun toString (): kotlin.String [fake_override] declared in <root>.IFoo
public open fun toString (): kotlin.String declared in <root>.IFoo
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:private <> () returnType:<root>.A [primary]
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 OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,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:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
@@ -60,11 +60,11 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.B
CONSTRUCTOR visibility:private <> () returnType:<root>.B [primary]
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 OBJECT name:B modality:FINAL visibility:public superTypes:[kotlin.Any]'
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,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:kotlin.Any
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
@@ -79,7 +79,7 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
VALUE_PARAMETER name:i index:0 type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun get (i: <root>.IFoo): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.A, i:<root>.IFoo, newValue:kotlin.Int) returnType:kotlin.Unit [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.A
@@ -90,7 +90,7 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
$receiver: VALUE_PARAMETER name:<this> type:<root>.B
VALUE_PARAMETER name:i index:0 type:<root>.IFoo
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>'
RETURN type=kotlin.Nothing from='public final fun get (i: <root>.IFoo): kotlin.Int declared in <root>'
CONST Int type=kotlin.Int value=1
FUN name:set visibility:public modality:FINAL <> ($receiver:<root>.B, i:<root>.IFoo2, newValue:kotlin.Int) returnType:kotlin.Unit [operator]
$receiver: VALUE_PARAMETER name:<this> type:<root>.B
@@ -118,13 +118,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.test1.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test1' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test1' type=<root>.A origin=null
i: GET_VAR 'val tmp_1: <root>.IFoo [val] declared in <root>.test1' type=<root>.IFoo origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: <root>.A [val] declared in <root>.test1' type=<root>.A origin=null
i: GET_VAR 'val tmp_1: <root>.IFoo [val] declared in <root>.test1' type=<root>.IFoo origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: <root>.A declared in <root>.test1' type=<root>.A origin=null
i: GET_VAR 'val tmp_1: <root>.IFoo declared in <root>.test1' type=<root>.IFoo origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_0: <root>.A declared in <root>.test1' type=<root>.A origin=null
i: GET_VAR 'val tmp_1: <root>.IFoo declared in <root>.test1' type=<root>.IFoo origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -142,13 +142,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
xs: VARARG type=kotlin.IntArray varargElementType=kotlin.Int
GET_VAR 'p0: kotlin.Int declared in <root>.test2.withVararg' type=kotlin.Int origin=null
FUNCTION_REFERENCE 'local final fun withVararg (p0: kotlin.Int): kotlin.Unit declared in <root>.test2' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun withVararg (vararg xs: kotlin.Int): kotlin.Int declared in <root>
CALL 'public final fun set (i: <root>.IFoo2, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_2: <root>.B [val] declared in <root>.test2' type=<root>.B origin=null
i: GET_VAR 'val tmp_3: <root>.IFoo2 [val] declared in <root>.test2' type=<root>.IFoo2 origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_2: <root>.B [val] declared in <root>.test2' type=<root>.B origin=null
i: GET_VAR 'val tmp_3: <root>.IFoo2 [val] declared in <root>.test2' type=<root>.IFoo2 origin=null
CALL 'public final fun set (i: <root>.IFoo2, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_2: <root>.B declared in <root>.test2' type=<root>.B origin=null
i: GET_VAR 'val tmp_3: <root>.IFoo2 declared in <root>.test2' type=<root>.IFoo2 origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_2: <root>.B declared in <root>.test2' type=<root>.B origin=null
i: GET_VAR 'val tmp_3: <root>.IFoo2 declared in <root>.test2' type=<root>.IFoo2 origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:test3 visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
@@ -159,13 +159,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
VAR IR_TEMPORARY_VARIABLE name:tmp_5 type:<root>.IFoo [val]
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>.test3' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_4: <root>.A [val] declared in <root>.test3' type=<root>.A origin=null
i: GET_VAR 'val tmp_5: <root>.IFoo [val] declared in <root>.test3' type=<root>.IFoo origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_4: <root>.A [val] declared in <root>.test3' type=<root>.A origin=null
i: GET_VAR 'val tmp_5: <root>.IFoo [val] declared in <root>.test3' type=<root>.IFoo origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_4: <root>.A declared in <root>.test3' type=<root>.A origin=null
i: GET_VAR 'val tmp_5: <root>.IFoo declared in <root>.test3' type=<root>.IFoo origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_4: <root>.A declared in <root>.test3' type=<root>.A origin=null
i: GET_VAR 'val tmp_5: <root>.IFoo declared in <root>.test3' type=<root>.IFoo origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:test4 visibility:public modality:FINAL <> (fn:kotlin.Function1<kotlin.Int, kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:fn index:0 type:kotlin.Function1<kotlin.Int, kotlin.Unit>
@@ -180,15 +180,15 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Function1<kotlin.Int, kotlin.Unit> [val]
GET_VAR 'fn: kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>.test4' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_6: <root>.A [val] declared in <root>.test4' type=<root>.A origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_6: <root>.A declared in <root>.test4' type=<root>.A origin=null
i: TYPE_OP type=<root>.IFoo origin=IMPLICIT_CAST typeOperand=<root>.IFoo
GET_VAR 'val tmp_7: kotlin.Function1<kotlin.Int, kotlin.Unit> [val] declared in <root>.test4' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_6: <root>.A [val] declared in <root>.test4' type=<root>.A origin=null
GET_VAR 'val tmp_7: kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>.test4' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_6: <root>.A declared in <root>.test4' type=<root>.A origin=null
i: TYPE_OP type=<root>.IFoo origin=IMPLICIT_CAST typeOperand=<root>.IFoo
GET_VAR 'val tmp_7: kotlin.Function1<kotlin.Int, kotlin.Unit> [val] declared in <root>.test4' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
GET_VAR 'val tmp_7: kotlin.Function1<kotlin.Int, kotlin.Unit> declared in <root>.test4' type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
@@ -203,13 +203,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
TYPE_OP type=<root>.IFoo origin=SAM_CONVERSION typeOperand=<root>.IFoo
TYPE_OP type=kotlin.Function1<kotlin.Int, kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function1<kotlin.Int, kotlin.Unit>
GET_VAR 'a: kotlin.Any declared in <root>.test5' type=kotlin.Any origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_8: <root>.A [val] declared in <root>.test5' type=<root>.A origin=null
i: GET_VAR 'val tmp_9: <root>.IFoo [val] declared in <root>.test5' type=<root>.IFoo origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_8: <root>.A [val] declared in <root>.test5' type=<root>.A origin=null
i: GET_VAR 'val tmp_9: <root>.IFoo [val] declared in <root>.test5' type=<root>.IFoo origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_8: <root>.A declared in <root>.test5' type=<root>.A origin=null
i: GET_VAR 'val tmp_9: <root>.IFoo declared in <root>.test5' type=<root>.IFoo origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_8: <root>.A declared in <root>.test5' type=<root>.A origin=null
i: GET_VAR 'val tmp_9: <root>.IFoo declared in <root>.test5' type=<root>.IFoo origin=null
other: CONST Int type=kotlin.Int value=1
FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit
VALUE_PARAMETER name:a index:0 type:kotlin.Any
@@ -225,13 +225,13 @@ FILE fqName:<root> fileName:/caoWithAdaptationForSam.kt
GET_OBJECT 'CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' type=<root>.A
VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Any [val]
GET_VAR 'a: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit [operator] declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_10: <root>.A [val] declared in <root>.test6' type=<root>.A origin=null
CALL 'public final fun set (i: <root>.IFoo, newValue: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val tmp_10: <root>.A declared in <root>.test6' type=<root>.A origin=null
i: TYPE_OP type=<root>.IFoo origin=IMPLICIT_CAST typeOperand=<root>.IFoo
GET_VAR 'val tmp_11: kotlin.Any [val] declared in <root>.test6' type=kotlin.Any origin=null
newValue: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun get (i: <root>.IFoo): kotlin.Int [operator] declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_10: <root>.A [val] declared in <root>.test6' type=<root>.A origin=null
GET_VAR 'val tmp_11: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
newValue: 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 (i: <root>.IFoo): kotlin.Int declared in <root>' type=kotlin.Int origin=PLUSEQ
$receiver: GET_VAR 'val tmp_10: <root>.A declared in <root>.test6' type=<root>.A origin=null
i: TYPE_OP type=<root>.IFoo origin=IMPLICIT_CAST typeOperand=<root>.IFoo
GET_VAR 'val tmp_11: kotlin.Any [val] declared in <root>.test6' type=kotlin.Any origin=null
GET_VAR 'val tmp_11: kotlin.Any declared in <root>.test6' type=kotlin.Any origin=null
other: CONST Int type=kotlin.Int value=1