[K/N] Deprecate SharedImmutable annotation #KT-57837
As a part of efforts to stabilize Native stdlib.
This commit is contained in:
committed by
Space Team
parent
0cfb80144a
commit
4ae19b2b44
@@ -33,6 +33,8 @@ public expect annotation class ThreadLocal()
|
||||
*
|
||||
* Since 1.7.20 usage of this annotation is deprecated. See https://kotlinlang.org/docs/native-migration-guide.html for details.
|
||||
*/
|
||||
@Deprecated("This annotation is redundant and has no effect")
|
||||
@DeprecatedSinceKotlin(warningSince = "1.9")
|
||||
@Target(AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
// Not @FreezingIsDeprecated: Lots of usages, only the doc updated.
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
package kotlin.io.encoding
|
||||
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
|
||||
// Benchmarks repository: https://github.com/qurbonzoda/KotlinBase64Benchmarks
|
||||
|
||||
/**
|
||||
@@ -568,7 +566,6 @@ public open class Base64 private constructor(
|
||||
|
||||
|
||||
// "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
|
||||
@SharedImmutable
|
||||
private val base64EncodeMap = byteArrayOf(
|
||||
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, /* 0 - 15 */
|
||||
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, /* 16 - 31 */
|
||||
@@ -577,7 +574,6 @@ private val base64EncodeMap = byteArrayOf(
|
||||
)
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SharedImmutable
|
||||
private val base64DecodeMap = IntArray(256).apply {
|
||||
this.fill(-1)
|
||||
this[Base64.padSymbol.toInt()] = -2
|
||||
@@ -587,7 +583,6 @@ private val base64DecodeMap = IntArray(256).apply {
|
||||
}
|
||||
|
||||
// "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
@SharedImmutable
|
||||
private val base64UrlEncodeMap = byteArrayOf(
|
||||
65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, /* 0 - 15 */
|
||||
81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, /* 16 - 31 */
|
||||
@@ -596,7 +591,6 @@ private val base64UrlEncodeMap = byteArrayOf(
|
||||
)
|
||||
|
||||
@ExperimentalEncodingApi
|
||||
@SharedImmutable
|
||||
private val base64UrlDecodeMap = IntArray(256).apply {
|
||||
this.fill(-1)
|
||||
this[Base64.padSymbol.toInt()] = -2
|
||||
|
||||
@@ -5,13 +5,10 @@
|
||||
|
||||
package kotlin.text
|
||||
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
|
||||
private const val LOWER_CASE_HEX_DIGITS = "0123456789abcdef"
|
||||
private const val UPPER_CASE_HEX_DIGITS = "0123456789ABCDEF"
|
||||
|
||||
// case-insensitive parsing
|
||||
@SharedImmutable
|
||||
private val HEX_DIGITS_TO_DECIMAL = IntArray(128) { -1 }.apply {
|
||||
LOWER_CASE_HEX_DIGITS.forEachIndexed { index, char -> this[char.code] = index }
|
||||
UPPER_CASE_HEX_DIGITS.forEachIndexed { index, char -> this[char.code] = index }
|
||||
|
||||
@@ -7,7 +7,6 @@ package kotlin
|
||||
|
||||
import kotlin.coroutines.*
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
|
||||
/**
|
||||
* Defines deep recursive function that keeps its stack on the heap,
|
||||
@@ -124,7 +123,6 @@ public sealed class DeepRecursiveScope<T, R> {
|
||||
|
||||
private typealias DeepRecursiveFunctionBlock = suspend DeepRecursiveScope<*, *>.(Any?) -> Any?
|
||||
|
||||
@SharedImmutable
|
||||
private val UNDEFINED_RESULT = Result.success(COROUTINE_SUSPENDED)
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
Reference in New Issue
Block a user