From c8306f1a3bc2a7040b2bc464c974d15fa4d73fad Mon Sep 17 00:00:00 2001 From: Igor Yakovlev Date: Fri, 11 Nov 2022 13:47:24 +0100 Subject: [PATCH] [Wasm] Mark rotate functions with WasExperimental --- libraries/stdlib/wasm/src/kotlin/Numbers.kt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libraries/stdlib/wasm/src/kotlin/Numbers.kt b/libraries/stdlib/wasm/src/kotlin/Numbers.kt index c8c7b6c590c..31d038ee5fb 100644 --- a/libraries/stdlib/wasm/src/kotlin/Numbers.kt +++ b/libraries/stdlib/wasm/src/kotlin/Numbers.kt @@ -52,11 +52,11 @@ public actual fun Int.takeLowestOneBit(): Int = * Rotating by a multiple of [Int.SIZE_BITS] (32) returns the same number, or more generally * `number.rotateLeft(n) == number.rotateLeft(n % 32)` */ -@ExperimentalStdlibApi +@SinceKotlin("1.6") +@WasExperimental(ExperimentalStdlibApi::class) public actual fun Int.rotateLeft(bitCount: Int): Int = shl(bitCount) or ushr(32 - bitCount) - /** * Rotates the binary representation of this [Int] number right by the specified [bitCount] number of bits. * The least significant bits pushed out from the right side reenter the number as the most significant bits on the left side. @@ -67,11 +67,11 @@ public actual fun Int.rotateLeft(bitCount: Int): Int = * Rotating by a multiple of [Int.SIZE_BITS] (32) returns the same number, or more generally * `number.rotateRight(n) == number.rotateRight(n % 32)` */ -@ExperimentalStdlibApi +@SinceKotlin("1.6") +@WasExperimental(ExperimentalStdlibApi::class) public actual fun Int.rotateRight(bitCount: Int): Int = shl(32 - bitCount) or ushr(bitCount) - /** * Counts the number of set bits in the binary representation of this [Long] number. */ @@ -114,7 +114,8 @@ public actual fun Long.takeLowestOneBit(): Long = * Rotating by a multiple of [Long.SIZE_BITS] (64) returns the same number, or more generally * `number.rotateLeft(n) == number.rotateLeft(n % 64)` */ -@ExperimentalStdlibApi +@SinceKotlin("1.6") +@WasExperimental(ExperimentalStdlibApi::class) public actual fun Long.rotateLeft(bitCount: Int): Long = shl(bitCount) or ushr(64 - bitCount) @@ -128,7 +129,8 @@ public actual fun Long.rotateLeft(bitCount: Int): Long = * Rotating by a multiple of [Long.SIZE_BITS] (64) returns the same number, or more generally * `number.rotateRight(n) == number.rotateRight(n % 64)` */ -@ExperimentalStdlibApi +@SinceKotlin("1.6") +@WasExperimental(ExperimentalStdlibApi::class) @kotlin.internal.InlineOnly public actual inline fun Long.rotateRight(bitCount: Int): Long = shl(64 - bitCount) or ushr(bitCount)