WASM: Impelment float to string conversion operations

This commit is contained in:
Igor Laevsky
2021-07-29 19:55:10 +03:00
committed by TeamCityServer
parent f34a079699
commit 0eba74a9d2
5 changed files with 351 additions and 24 deletions
@@ -1758,7 +1758,7 @@ public class Float private constructor(public val value: Float) : Number(), Comp
other is Float && this.equals(other)
public override fun toString(): String =
TODO("Wasm: string coercion")
dtoa(this.toDouble())
public override inline fun hashCode(): Int =
bits()
@@ -2071,7 +2071,7 @@ public class Double private constructor(public val value: Double) : Number(), Co
other is Double && this.bits() == other.bits()
public override fun toString(): String =
TODO("Wasm: string coercion")
dtoa(this)
public override inline fun hashCode(): Int = bits().hashCode()