[WASM] Regex std implementation
This commit is contained in:
committed by
TeamCityServer
parent
4f9b54da26
commit
d55e16a030
@@ -9,3 +9,23 @@ package kotlin.native.concurrent
|
||||
|
||||
internal val Any?.isFrozen
|
||||
inline get() = false
|
||||
|
||||
internal inline fun <T> T.freeze(): T = this
|
||||
|
||||
internal class AtomicReference<T>(public var value: T) {
|
||||
public fun compareAndSwap(expected: T, new: T): T {
|
||||
if (value == expected) {
|
||||
val old = value
|
||||
value = new
|
||||
return old
|
||||
}
|
||||
return value
|
||||
}
|
||||
public fun compareAndSet(expected: T, new: T): Boolean {
|
||||
if (value == expected) {
|
||||
value = new
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user