[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
+29 -29
View File
@@ -5,50 +5,50 @@ FILE fqName:<root> fileName:/whileDoWhile.kt
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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: 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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=5
body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val]
GET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_0: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_0: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=10
body: BLOCK type=kotlin.Unit origin=null
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val]
GET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_1: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_1: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_1: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=0
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val]
GET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_2: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_2: kotlin.Int declared in <root>.test' type=kotlin.Int origin=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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=15
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
@@ -56,13 +56,13 @@ FILE fqName:<root> fileName:/whileDoWhile.kt
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
BLOCK type=kotlin.Int origin=POSTFIX_INCR
VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val]
GET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int [var] declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int [val] declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=POSTFIX_INCR
SET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Unit origin=POSTFIX_INCR
CALL 'public final fun inc (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=POSTFIX_INCR
$this: GET_VAR 'val tmp_3: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
GET_VAR 'val tmp_3: kotlin.Int declared in <root>.test' type=kotlin.Int origin=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 x: kotlin.Int [var] declared in <root>.test' type=kotlin.Int origin=null
arg0: GET_VAR 'var x: kotlin.Int declared in <root>.test' type=kotlin.Int origin=null
arg1: CONST Int type=kotlin.Int value=20
FUN name:testSmartcastInCondition visibility:public modality:FINAL <> () returnType:kotlin.Unit
BLOCK_BODY
@@ -71,14 +71,14 @@ FILE fqName:<root> fileName:/whileDoWhile.kt
WHEN type=kotlin.Unit origin=IF
BRANCH
if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Boolean
GET_VAR 'val a: kotlin.Any? [val] declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null
GET_VAR 'val a: kotlin.Any? declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null
then: BLOCK type=kotlin.Unit origin=null
WHILE label=null origin=WHILE_LOOP
condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR 'val a: kotlin.Any? [val] declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null
GET_VAR 'val a: kotlin.Any? declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null
body: BLOCK type=kotlin.Unit origin=null
BLOCK type=kotlin.Unit origin=null
DO_WHILE label=null origin=DO_WHILE_LOOP
body: COMPOSITE type=kotlin.Unit origin=null
condition: TYPE_OP type=kotlin.Boolean origin=IMPLICIT_CAST typeOperand=kotlin.Boolean
GET_VAR 'val a: kotlin.Any? [val] declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null
GET_VAR 'val a: kotlin.Any? declared in <root>.testSmartcastInCondition' type=kotlin.Any? origin=null