[stdlib] Explicit visibility and return types: Wasm

This commit is contained in:
Ilya Gorbunov
2023-11-12 02:09:15 +01:00
committed by Space Team
parent 381a8fd55f
commit cfa8a1dc0f
15 changed files with 54 additions and 54 deletions
+6 -6
View File
@@ -140,33 +140,33 @@ public actual inline fun Long.rotateRight(bitCount: Int): Long =
* Returns `true` if the specified number is a
* Not-a-Number (NaN) value, `false` otherwise.
*/
actual fun Double.isNaN(): Boolean = this != this
public actual fun Double.isNaN(): Boolean = this != this
/**
* Returns `true` if the specified number is a
* Not-a-Number (NaN) value, `false` otherwise.
*/
actual fun Float.isNaN(): Boolean = this != this
public actual fun Float.isNaN(): Boolean = this != this
/**
* Returns `true` if this value is infinitely large in magnitude.
*/
actual fun Double.isInfinite(): Boolean = (this == Double.POSITIVE_INFINITY) || (this == Double.NEGATIVE_INFINITY)
public actual fun Double.isInfinite(): Boolean = (this == Double.POSITIVE_INFINITY) || (this == Double.NEGATIVE_INFINITY)
/**
* Returns `true` if this value is infinitely large in magnitude.
*/
actual fun Float.isInfinite(): Boolean = (this == Float.POSITIVE_INFINITY) || (this == Float.NEGATIVE_INFINITY)
public actual fun Float.isInfinite(): Boolean = (this == Float.POSITIVE_INFINITY) || (this == Float.NEGATIVE_INFINITY)
/**
* Returns `true` if the argument is a finite floating-point value; returns `false` otherwise (for `NaN` and infinity arguments).
*/
actual fun Double.isFinite(): Boolean = !isInfinite() && !isNaN()
public actual fun Double.isFinite(): Boolean = !isInfinite() && !isNaN()
/**
* Returns `true` if the argument is a finite floating-point value; returns `false` otherwise (for `NaN` and infinity arguments).
*/
actual fun Float.isFinite(): Boolean = !isInfinite() && !isNaN()
public actual fun Float.isFinite(): Boolean = !isInfinite() && !isNaN()
/**
* Returns a bit representation of the specified floating-point value as [Long]
@@ -7,8 +7,8 @@ package kotlin.coroutines.cancellation
@SinceKotlin("1.4")
public actual open class CancellationException : IllegalStateException {
actual constructor() : super()
actual constructor(message: String?) : super(message)
constructor(message: String?, cause: Throwable?) : super(message, cause)
constructor(cause: Throwable?) : super(cause)
public actual constructor() : super()
public actual constructor(message: String?) : super(message)
public constructor(message: String?, cause: Throwable?) : super(message, cause)
public constructor(cause: Throwable?) : super(cause)
}
@@ -11,5 +11,5 @@ package kotlin.text
@SinceKotlin("1.4")
@WasExperimental(ExperimentalStdlibApi::class)
public actual open class CharacterCodingException(message: String?) : Exception(message) {
actual constructor() : this(null)
public actual constructor() : this(null)
}
@@ -13,13 +13,13 @@ import kotlin.wasm.internal.wasm_f32_demote_f64
*
* There are also strict versions of the function available on non-nullable String, [toBooleanStrict] and [toBooleanStrictOrNull].
*/
actual fun String?.toBoolean(): Boolean = this != null && this.lowercase() == "true"
public actual fun String?.toBoolean(): Boolean = this != null && this.lowercase() == "true"
/**
* Parses the string as a signed [Byte] number and returns the result.
* @throws NumberFormatException if the string is not a valid representation of a number.
*/
actual fun String.toByte(): Byte = toByteOrNull() ?: numberFormatError(this)
public actual fun String.toByte(): Byte = toByteOrNull() ?: numberFormatError(this)
/**
* Parses the string as a signed [Byte] number and returns the result.
@@ -119,7 +119,7 @@ public actual fun Short.toString(radix: Int): String = this.toLong().toString(ra
* @throws IllegalArgumentException when [radix] is not a valid radix for number to string conversion.
*/
@SinceKotlin("1.2")
actual fun Int.toString(radix: Int): String = toLong().toString(radix)
public actual fun Int.toString(radix: Int): String = toLong().toString(radix)
/**
* Returns a string representation of this [Long] value in the specified [radix].
@@ -127,7 +127,7 @@ actual fun Int.toString(radix: Int): String = toLong().toString(radix)
* @throws IllegalArgumentException when [radix] is not a valid radix for number to string conversion.
*/
@SinceKotlin("1.2")
actual fun Long.toString(radix: Int): String {
public actual fun Long.toString(radix: Int): String {
checkRadix(radix)
fun Long.getChar() = toInt().let { if (it < 10) '0' + it else 'a' + (it - 10) }
@@ -513,7 +513,7 @@ public actual fun CharSequence.isBlank(): Boolean = length == 0 || indices.all {
* @param otherOffset the start offset in the other char sequence of the substring to compare.
* @param length the length of the substring to compare.
*/
actual fun CharSequence.regionMatches(
public actual fun CharSequence.regionMatches(
thisOffset: Int,
other: CharSequence,
otherOffset: Int,