[K/Wasm] Remove custom equals because this kind of equality is lowered in duration of the compilation ^KT-58126 Fixed

This commit is contained in:
Artem Kobzar
2023-06-20 17:36:01 +00:00
committed by Space Team
parent 4fe3e875fa
commit c53b49d7fa
2 changed files with 2 additions and 49 deletions
@@ -429,11 +429,6 @@ public class Byte private constructor(private val value: Byte) : Number(), Compa
public override fun equals(other: Any?): Boolean =
other is Byte && wasm_i32_eq(this.toInt(), other.toInt())
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_EQ)
public fun equals(other: Byte): Boolean =
implementedAsIntrinsic
public override fun hashCode(): Int = this.toInt()
@WasmNoOpCast
@@ -858,11 +853,6 @@ public class Short private constructor(private val value: Short) : Number(), Com
public override fun equals(other: Any?): Boolean =
other is Short && wasm_i32_eq(this.toInt(), other.toInt())
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_EQ)
public fun equals(other: Short): Boolean =
implementedAsIntrinsic
public override fun hashCode(): Int = this.toInt()
@WasmNoOpCast
@@ -1351,11 +1341,6 @@ public class Int private constructor(private val value: Int) : Number(), Compara
public override fun equals(other: Any?): Boolean =
other is Int && wasm_i32_eq(this, other)
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I32_EQ)
public fun equals(other: Int): Boolean =
implementedAsIntrinsic
public override fun hashCode(): Int = this
@WasmNoOpCast
@@ -1858,11 +1843,6 @@ public class Long private constructor(private val value: Long) : Number(), Compa
public override fun equals(other: Any?): Boolean =
other is Long && wasm_i64_eq(this, other)
@kotlin.internal.IntrinsicConstEvaluation
@WasmOp(WasmOp.I64_EQ)
public fun equals(other: Long): Boolean =
implementedAsIntrinsic
public override fun hashCode(): Int = ((this ushr 32) xor this).toInt()
}
@@ -2254,10 +2234,7 @@ public class Float private constructor(private val value: Float) : Number(), Com
@kotlin.internal.IntrinsicConstEvaluation
public override fun equals(other: Any?): Boolean =
other is Float && this.equals(other)
@kotlin.internal.IntrinsicConstEvaluation
public inline fun equals(other: Float): Boolean = toBits() == other.toBits()
other is Float && this.toBits() == other.toBits()
public override fun hashCode(): Int = toBits()
}
@@ -2654,8 +2631,5 @@ public class Double private constructor(private val value: Double) : Number(), C
public override fun equals(other: Any?): Boolean =
other is Double && this.toBits() == other.toBits()
@kotlin.internal.IntrinsicConstEvaluation
public inline fun equals(other: Double): Boolean = toBits() == other.toBits()
public override fun hashCode(): Int = toBits().hashCode()
}