[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
@@ -14,7 +14,6 @@ import kotlin.native.concurrent.*
|
||||
|
||||
class Z(val x: Int)
|
||||
|
||||
@SharedImmutable
|
||||
val z1 = Z(42)
|
||||
|
||||
val z2 = Z(x.s.length)
|
||||
|
||||
@@ -9,7 +9,6 @@ package runtime.concurrent.worker_bound_reference0
|
||||
import kotlin.test.*
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.concurrent.SharedImmutable
|
||||
import kotlin.native.*
|
||||
import kotlin.native.ref.WeakReference
|
||||
import kotlin.native.runtime.GC
|
||||
@@ -17,7 +16,6 @@ import kotlin.text.Regex
|
||||
|
||||
class A(var a: Int)
|
||||
|
||||
@SharedImmutable
|
||||
val global1: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -36,7 +34,6 @@ fun testGlobal() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global2: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -67,7 +64,6 @@ fun testGlobalAccessOnWorker() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global3: WorkerBoundReference<A> = WorkerBoundReference(A(3).freeze())
|
||||
|
||||
@Test
|
||||
@@ -85,7 +81,6 @@ fun testGlobalAccessOnWorkerFrozenInitially() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global4: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -103,7 +98,6 @@ fun testGlobalAccessOnWorkerFrozenBeforePassing() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global5: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -131,7 +125,6 @@ fun testGlobalAccessOnWorkerFrozenBeforeAccess() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global6: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
@@ -159,7 +152,6 @@ fun testGlobalModification() {
|
||||
worker.requestTermination().result
|
||||
}
|
||||
|
||||
@SharedImmutable
|
||||
val global7: WorkerBoundReference<A> = WorkerBoundReference(A(3))
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,7 +19,6 @@ var topStringVar = "string"
|
||||
val topSharedStringWithGetter: String
|
||||
get() = "top"
|
||||
val topData = Data(42)
|
||||
@SharedImmutable
|
||||
val topSharedData = Data(43)
|
||||
|
||||
@Test fun runTest1() {
|
||||
@@ -88,7 +87,6 @@ val topSharedData = Data(43)
|
||||
}
|
||||
|
||||
val atomicRef = AtomicReference<Any?>(Any().freeze())
|
||||
@SharedImmutable
|
||||
val stableRef = StableRef.create(Any().freeze())
|
||||
val semaphore = AtomicInt(0)
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ fun initJobs(count: Int) = Array<Job?>(count) { i -> Job(i, i * 2, i)}
|
||||
|
||||
val COUNT = 2
|
||||
|
||||
@SharedImmutable
|
||||
val counters = Array(COUNT) { AtomicInt(0) }
|
||||
|
||||
@Test fun runTest1() {
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
package test.text
|
||||
|
||||
|
||||
@SharedImmutable
|
||||
internal actual val surrogateCodePointDecoding: String = "\uFFFD".repeat(3)
|
||||
|
||||
@SharedImmutable
|
||||
internal actual val surrogateCharEncoding: ByteArray = byteArrayOf(0xEF.toByte(), 0xBF.toByte(), 0xBD.toByte())
|
||||
|
||||
@@ -12,7 +12,6 @@ package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@SharedImmutable
|
||||
private val caseIgnorableRanges = arrayOf<IntRange>(
|
||||
0x0027..0x0027,
|
||||
0x002e..0x002e,
|
||||
|
||||
@@ -12,7 +12,6 @@ package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@SharedImmutable
|
||||
private val casedRanges = arrayOf<IntRange>(
|
||||
0x0041..0x005a,
|
||||
0x0061..0x007a,
|
||||
|
||||
Reference in New Issue
Block a user