Promote rotateLeft and rotateRight to stable
This commit is contained in:
@@ -171,8 +171,8 @@ 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)`
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.6")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual fun Int.rotateLeft(bitCount: Int): Int =
|
||||
shl(bitCount) or ushr(32 - bitCount)
|
||||
|
||||
@@ -187,8 +187,8 @@ 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)`
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.6")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual fun Int.rotateRight(bitCount: Int): Int =
|
||||
shl(32 - bitCount) or ushr(bitCount)
|
||||
|
||||
@@ -259,8 +259,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)`
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalStdlibApi
|
||||
@SinceKotlin("1.6")
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual fun Long.rotateLeft(bitCount: Int): Long =
|
||||
shl(bitCount) or ushr(64 - bitCount)
|
||||
|
||||
@@ -274,8 +274,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)`
|
||||
*/
|
||||
@SinceKotlin("1.3")
|
||||
@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)
|
||||
|
||||
Reference in New Issue
Block a user