From 6efeee2037126fb88757119d87bc28752e6c3966 Mon Sep 17 00:00:00 2001 From: Svyatoslav Kuzmich Date: Thu, 19 Jan 2023 19:48:30 +0100 Subject: [PATCH] [Wasm] stdlib API: remove bitwise Byte and Short operations from builtins They shadow kotlin.experimental extensions --- .../stdlib/wasm/builtins/kotlin/Primitives.kt | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt index 2b501937825..c292aa5b61e 100644 --- a/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt +++ b/libraries/stdlib/wasm/builtins/kotlin/Primitives.kt @@ -359,29 +359,6 @@ public class Byte private constructor(public val value: Byte) : Number(), Compar */ public override fun toDouble(): Double = wasm_f64_convert_i32_s(this.toInt()) - /** Performs a bitwise AND operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_AND) - public infix fun and(other: Byte): Byte = - implementedAsIntrinsic - - /** Performs a bitwise OR operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_OR) - public infix fun or(other: Byte): Byte = - implementedAsIntrinsic - - /** Performs a bitwise XOR operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_XOR) - public infix fun xor(other: Byte): Byte = - implementedAsIntrinsic - - /** Inverts the bits in this value/ */ - @SinceKotlin("1.1") - public inline fun inv(): Byte = this.xor(-1) - - public override fun equals(other: Any?): Boolean = other is Byte && wasm_i32_eq(this.toInt(), other.toInt()) @@ -702,29 +679,6 @@ public class Short private constructor(public val value: Short) : Number(), Comp @ExperimentalStdlibApi public operator fun rangeUntil(other: Long): LongRange = this until other - /** Performs a bitwise AND operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_AND) - public infix fun and(other: Short): Short = - implementedAsIntrinsic - - /** Performs a bitwise OR operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_OR) - public infix fun or(other: Short): Short = - implementedAsIntrinsic - - /** Performs a bitwise XOR operation between the two values. */ - @SinceKotlin("1.1") - @WasmOp(WasmOp.I32_XOR) - public infix fun xor(other: Short): Short = - implementedAsIntrinsic - - /** Inverts the bits in this value */ - @SinceKotlin("1.1") - public fun inv(): Short = - this.xor(-1) - /** * Converts this [Short] value to [Byte]. *