WASM: Don't use intrinsics to specify NaN's
This commit is contained in:
committed by
teamcityserver
parent
4ffed54f76
commit
5db8ec6551
@@ -1491,9 +1491,8 @@ public class Float private constructor(public val value: Float) : Number(), Comp
|
||||
/**
|
||||
* A constant holding the "not a number" value of Float.
|
||||
*/
|
||||
public val NaN: Float
|
||||
get() =
|
||||
wasm_float_nan()
|
||||
@Suppress("DIVISION_BY_ZERO")
|
||||
public val NaN: Float = 0.0f / 0.0f
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1800,10 +1799,8 @@ public class Double private constructor(public val value: Double) : Number(), Co
|
||||
/**
|
||||
* A constant holding the "not a number" value of Double.
|
||||
*/
|
||||
public val NaN: Double
|
||||
get() =
|
||||
wasm_double_nan()
|
||||
|
||||
@Suppress("DIVISION_BY_ZERO")
|
||||
public val NaN: Double = 0.0 / 0.0
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,12 +13,6 @@ package kotlin.wasm.internal
|
||||
internal fun wasm_unreachable(): Nothing =
|
||||
implementedAsIntrinsic
|
||||
|
||||
internal fun wasm_float_nan(): Float =
|
||||
implementedAsIntrinsic
|
||||
|
||||
internal fun wasm_double_nan(): Double =
|
||||
implementedAsIntrinsic
|
||||
|
||||
internal fun <To> wasm_ref_cast(a: Any?): To =
|
||||
implementedAsIntrinsic
|
||||
|
||||
|
||||
Reference in New Issue
Block a user