[JS IR BE] hashCode, toString, number conversion support

This commit is contained in:
Svyatoslav Kuzmich
2018-06-13 15:54:34 +03:00
parent a7a695f203
commit 83f8cfaa66
73 changed files with 602 additions and 108 deletions
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun less1(a: Double, b: Double) = a.compareTo(b) == -1
fun less2(a: Double?, b: Double?) = a!!.compareTo(b!!) == -1
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun equals1(a: Double, b: Double) = a.equals(b)
fun equals2(a: Double?, b: Double?) = a!!.equals(b!!)
-1
View File
@@ -1,4 +1,3 @@
// IGNORE_BACKEND: JS_IR
fun box(): String {
val plusZero: Double? = 0.0
val minusZero: Double = -0.0
@@ -1,5 +1,4 @@
// !LANGUAGE: +ProperIeee754Comparisons
// IGNORE_BACKEND: JS_IR
fun ne(x: Any, y: Any) = x is Double && y is Float && x != y
fun lt(x: Any, y: Any) = x is Double && y is Float && x < y