[Tests] Use stable order for ir/kotlinLike dumps

^KT-65406
This commit is contained in:
Pavel Kunyavskiy
2024-02-05 16:23:41 +01:00
committed by Space Team
parent 0fa42a9c11
commit e6f4d6e6fa
1265 changed files with 43896 additions and 48472 deletions
@@ -6,13 +6,6 @@ FILE fqName:<root> fileName:/dynamicBinaryEqualityOperator.kt
DYN_OP operator=EQEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testEqeq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testExclEq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExclEq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EXCLEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testExclEq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testEqeqeq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -20,6 +13,13 @@ FILE fqName:<root> fileName:/dynamicBinaryEqualityOperator.kt
DYN_OP operator=EQEQEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testEqeqeq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testExclEq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExclEq (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=EXCLEQ type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testExclEq' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=3
FUN name:testExclEqeq visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -2,14 +2,14 @@ fun testEqeq(d: dynamic): Boolean {
return d == 3
}
fun testExclEq(d: dynamic): Boolean {
return d != 3
}
fun testEqeqeq(d: dynamic): Boolean {
return d === 3
}
fun testExclEq(d: dynamic): Boolean {
return d != 3
}
fun testExclEqeq(d: dynamic): Boolean {
return d !== 3
}
@@ -1,11 +1,4 @@
FILE fqName:<root> fileName:/dynamicBinaryOperator.kt
FUN name:testBinaryPlus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testBinaryPlus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=BINARY_PLUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testBinaryPlus' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testBinaryMinus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -13,13 +6,13 @@ FILE fqName:<root> fileName:/dynamicBinaryOperator.kt
DYN_OP operator=BINARY_MINUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testBinaryMinus' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testMul visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
FUN name:testBinaryPlus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testMul (d: dynamic): dynamic declared in <root>'
DYN_OP operator=MUL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testMul' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
RETURN type=kotlin.Nothing from='public final fun testBinaryPlus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=BINARY_PLUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testBinaryPlus' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=1
FUN name:testDiv visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -34,3 +27,10 @@ FILE fqName:<root> fileName:/dynamicBinaryOperator.kt
DYN_OP operator=MOD type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testMod' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testMul visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testMul (d: dynamic): dynamic declared in <root>'
DYN_OP operator=MUL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testMul' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
@@ -1,13 +1,9 @@
fun testBinaryPlus(d: dynamic): dynamic {
return d + 1
}
fun testBinaryMinus(d: dynamic): dynamic {
return d - 1
}
fun testMul(d: dynamic): dynamic {
return d * 2
fun testBinaryPlus(d: dynamic): dynamic {
return d + 1
}
fun testDiv(d: dynamic): dynamic {
@@ -18,3 +14,7 @@ fun testMod(d: dynamic): dynamic {
return d % 2
}
fun testMul(d: dynamic): dynamic {
return d * 2
}
@@ -1,18 +1,4 @@
FILE fqName:<root> fileName:/dynamicBinaryRelationalOperator.kt
FUN name:testLess visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLess (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LT type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLess' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testLessOrEqual visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLessOrEqual (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LE type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLessOrEqual' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testGreater visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -27,3 +13,17 @@ FILE fqName:<root> fileName:/dynamicBinaryRelationalOperator.kt
DYN_OP operator=GE type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testGreaterOrEqual' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testLess visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLess (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LT type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLess' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
FUN name:testLessOrEqual visibility:public modality:FINAL <> (d:dynamic) returnType:kotlin.Boolean
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testLessOrEqual (d: dynamic): kotlin.Boolean declared in <root>'
DYN_OP operator=LE type=kotlin.Boolean
receiver: GET_VAR 'd: dynamic declared in <root>.testLessOrEqual' type=dynamic origin=null
0: CONST Int type=kotlin.Int value=2
@@ -1,11 +1,3 @@
fun testLess(d: dynamic): Boolean {
return d < 2
}
fun testLessOrEqual(d: dynamic): Boolean {
return d <= 2
}
fun testGreater(d: dynamic): Boolean {
return d > 2
}
@@ -14,3 +6,11 @@ fun testGreaterOrEqual(d: dynamic): Boolean {
return d >= 2
}
fun testLess(d: dynamic): Boolean {
return d < 2
}
fun testLessOrEqual(d: dynamic): Boolean {
return d <= 2
}
@@ -1,12 +1,6 @@
FILE fqName:<root> fileName:/dynamicInDataClass.kt
CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Some
CONSTRUCTOR visibility:public <> (a:kotlin.String, b:dynamic) returnType:<root>.Some [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
EXPRESSION_BODY
@@ -29,6 +23,12 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
RETURN type=kotlin.Nothing from='public final fun <get-b> (): dynamic declared in <root>.Some'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.<get-b>' type=<root>.Some origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.String, b:dynamic) returnType:<root>.Some [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Some) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
@@ -56,50 +56,6 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.String, b: dynamic) declared in <root>.Some' type=<root>.Some origin=null
a: GET_VAR 'a: kotlin.String declared in <root>.Some.copy' type=kotlin.String origin=null
b: GET_VAR 'b: dynamic declared in <root>.Some.copy' type=dynamic origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Some'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Some("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="b="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some 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: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Some'
GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Some, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -144,6 +100,50 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Some'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some 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: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Some'
GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Some'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Some("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="b="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:event type:<root>.Some [val]
@@ -1,10 +1,4 @@
data class Some {
constructor(a: String, b: dynamic) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: String
field = a
get
@@ -13,6 +7,12 @@ data class Some {
field = b
get
constructor(a: String, b: dynamic) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun component1(): String {
return <this>.#a
}
@@ -25,19 +25,6 @@ data class Some {
return Some(a = a, b = b)
}
override fun toString(): String {
return "Some(" + "a=" + <this>.#a + ", " + "b=" + <this>.#b + ")"
}
override fun hashCode(): Int {
var result: Int = <this>.#a.hashCode()
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#b, arg1 = null) -> 0
else -> <this>.#b.hashCode()
})
return result
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -55,6 +42,19 @@ data class Some {
return true
}
override fun hashCode(): Int {
var result: Int = <this>.#a.hashCode()
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#b, arg1 = null) -> 0
else -> <this>.#b.hashCode()
})
return result
}
override fun toString(): String {
return "Some(" + "a=" + <this>.#a + ", " + "b=" + <this>.#b + ")"
}
}
fun box(): String {
@@ -62,3 +62,4 @@ fun box(): String {
event.hashCode() /*~> Unit */
return "OK"
}
@@ -1,12 +1,6 @@
FILE fqName:<root> fileName:/dynamicInDataClass.kt
CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Some
CONSTRUCTOR visibility:public <> (a:kotlin.String, b:dynamic) returnType:<root>.Some [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
PROPERTY name:a visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]
EXPRESSION_BODY
@@ -29,6 +23,12 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
RETURN type=kotlin.Nothing from='public final fun <get-b> (): dynamic declared in <root>.Some'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.<get-b>' type=<root>.Some origin=null
CONSTRUCTOR visibility:public <> (a:kotlin.String, b:dynamic) returnType:<root>.Some [primary]
VALUE_PARAMETER name:a index:0 type:kotlin.String
VALUE_PARAMETER name:b index:1 type:dynamic
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Some modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Some) returnType:kotlin.String [operator]
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
@@ -56,51 +56,6 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
CONSTRUCTOR_CALL 'public constructor <init> (a: kotlin.String, b: dynamic) declared in <root>.Some' type=<root>.Some origin=null
a: GET_VAR 'a: kotlin.String declared in <root>.Some.copy' type=kotlin.String origin=null
b: GET_VAR 'b: dynamic declared in <root>.Some.copy' type=dynamic origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Some'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Some("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="b="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=")"
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some 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: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Some'
GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Some, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
overridden:
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
@@ -145,6 +100,51 @@ FILE fqName:<root> fileName:/dynamicInDataClass.kt
CONST Boolean type=kotlin.Boolean value=false
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Some'
CONST Boolean type=kotlin.Boolean value=true
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.Int
overridden:
public open fun hashCode (): kotlin.Int declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
VAR name:result type:kotlin.Int [var]
CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
SET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Unit origin=EQ
CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
$this: GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
other: CONST Int type=kotlin.Int value=31
other: 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_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some 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: CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
$this: TYPE_OP type=kotlin.Any origin=IMPLICIT_DYNAMIC_CAST typeOperand=kotlin.Any
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.hashCode' type=<root>.Some origin=null
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Some'
GET_VAR 'var result: kotlin.Int declared in <root>.Some.hashCode' type=kotlin.Int origin=null
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Some) returnType:kotlin.String
overridden:
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:<root>.Some
BLOCK_BODY
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Some'
STRING_CONCATENATION type=kotlin.String
CONST String type=kotlin.String value="Some("
CONST String type=kotlin.String value="a="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=", "
CONST String type=kotlin.String value="b="
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:b type:dynamic visibility:private [final]' type=dynamic origin=null
receiver: GET_VAR '<this>: <root>.Some declared in <root>.Some.toString' type=<root>.Some origin=null
CONST String type=kotlin.String value=")"
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
BLOCK_BODY
VAR name:event type:<root>.Some [val]
@@ -1,10 +1,4 @@
data class Some {
constructor(a: String, b: dynamic) /* primary */ {
super/*Any*/()
/* <init>() */
}
val a: String
field = a
get
@@ -13,6 +7,12 @@ data class Some {
field = b
get
constructor(a: String, b: dynamic) /* primary */ {
super/*Any*/()
/* <init>() */
}
operator fun component1(): String {
return <this>.#a
}
@@ -25,19 +25,6 @@ data class Some {
return Some(a = a, b = b)
}
override fun toString(): String {
return "Some(" + "a=" + <this>.#a + ", " + "b=" + <this>.#b + ")"
}
override fun hashCode(): Int {
var result: Int = <this>.#a.hashCode()
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#b, arg1 = null) -> 0
else -> <this>.#b /*~> Any */.hashCode()
})
return result
}
override operator fun equals(other: Any?): Boolean {
when {
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
@@ -55,6 +42,19 @@ data class Some {
return true
}
override fun hashCode(): Int {
var result: Int = <this>.#a.hashCode()
result = result.times(other = 31).plus(other = when {
EQEQ(arg0 = <this>.#b, arg1 = null) -> 0
else -> <this>.#b /*~> Any */.hashCode()
})
return result
}
override fun toString(): String {
return "Some(" + "a=" + <this>.#a + ", " + "b=" + <this>.#b + ")"
}
}
fun box(): String {
@@ -62,3 +62,4 @@ fun box(): String {
event.hashCode() /*~> Unit */
return "OK"
}
@@ -1,4 +1,10 @@
FILE fqName:<root> fileName:/dynamicUnaryOperator.kt
FUN name:testExcl visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExcl (d: dynamic): dynamic declared in <root>'
DYN_OP operator=EXCL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testExcl' type=dynamic origin=null
FUN name:testUnaryMinus visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
@@ -11,9 +17,3 @@ FILE fqName:<root> fileName:/dynamicUnaryOperator.kt
RETURN type=kotlin.Nothing from='public final fun testUnaryPlus (d: dynamic): dynamic declared in <root>'
DYN_OP operator=UNARY_PLUS type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testUnaryPlus' type=dynamic origin=null
FUN name:testExcl visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun testExcl (d: dynamic): dynamic declared in <root>'
DYN_OP operator=EXCL type=dynamic
receiver: GET_VAR 'd: dynamic declared in <root>.testExcl' type=dynamic origin=null
@@ -1,3 +1,7 @@
fun testExcl(d: dynamic): dynamic {
return !d
}
fun testUnaryMinus(d: dynamic): dynamic {
return -d
}
@@ -6,7 +10,3 @@ fun testUnaryPlus(d: dynamic): dynamic {
return +d
}
fun testExcl(d: dynamic): dynamic {
return !d
}
@@ -32,11 +32,6 @@ FILE fqName:<root> fileName:/implicitCastToDynamic.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d2 type:dynamic visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: dynamic declared in <root>.<set-d2>' type=dynamic origin=null
FUN name:withDynamic visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withDynamic (d: dynamic): dynamic declared in <root>'
GET_VAR 'd: dynamic declared in <root>.withDynamic' type=dynamic origin=null
FUN name:test1 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
@@ -77,3 +72,8 @@ FILE fqName:<root> fileName:/implicitCastToDynamic.kt
<set-?>: GET_VAR 'na: kotlin.Any? declared in <root>.test5' type=kotlin.Any? origin=null
CALL 'public final fun <set-d2> (<set-?>: dynamic): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 's: kotlin.String declared in <root>.test5' type=kotlin.String origin=null
FUN name:withDynamic visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withDynamic (d: dynamic): dynamic declared in <root>'
GET_VAR 'd: dynamic declared in <root>.withDynamic' type=dynamic origin=null
@@ -11,10 +11,6 @@ var d2: dynamic
get
set
fun withDynamic(d: dynamic): dynamic {
return d
}
fun test1(s: String) {
withDynamic(d = s) /*~> Unit */
}
@@ -40,3 +36,7 @@ fun test5(a: Any, s: String, na: Any?) {
<set-d2>(<set-?> = s)
}
fun withDynamic(d: dynamic): dynamic {
return d
}
@@ -32,11 +32,6 @@ FILE fqName:<root> fileName:/implicitCastToDynamic.kt
BLOCK_BODY
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:d2 type:dynamic visibility:private [static]' type=kotlin.Unit origin=null
value: GET_VAR '<set-?>: dynamic declared in <root>.<set-d2>' type=dynamic origin=null
FUN name:withDynamic visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withDynamic (d: dynamic): dynamic declared in <root>'
GET_VAR 'd: dynamic declared in <root>.withDynamic' type=dynamic origin=null
FUN name:test1 visibility:public modality:FINAL <> (s:kotlin.String) returnType:kotlin.Unit
VALUE_PARAMETER name:s index:0 type:kotlin.String
BLOCK_BODY
@@ -76,3 +71,8 @@ FILE fqName:<root> fileName:/implicitCastToDynamic.kt
<set-?>: GET_VAR 'na: kotlin.Any? declared in <root>.test5' type=kotlin.Any? origin=null
CALL 'public final fun <set-d2> (<set-?>: dynamic): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: GET_VAR 's: kotlin.String declared in <root>.test5' type=kotlin.String origin=null
FUN name:withDynamic visibility:public modality:FINAL <> (d:dynamic) returnType:dynamic
VALUE_PARAMETER name:d index:0 type:dynamic
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun withDynamic (d: dynamic): dynamic declared in <root>'
GET_VAR 'd: dynamic declared in <root>.withDynamic' type=dynamic origin=null
@@ -11,10 +11,6 @@ var d2: dynamic
get
set
fun withDynamic(d: dynamic): dynamic {
return d
}
fun test1(s: String) {
withDynamic(d = s)
}
@@ -40,3 +36,7 @@ fun test5(a: Any, s: String, na: Any?) {
<set-d2>(<set-?> = s)
}
fun withDynamic(d: dynamic): dynamic {
return d
}