Capitalize copies of JVM annotations for js stdlib
This commit is contained in:
@@ -26,11 +26,11 @@ import kotlin.InlineOption.ONLY_LOCAL_RETURN
|
||||
@native
|
||||
@Target(AnnotationTarget.PROPERTY, AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class volatile
|
||||
public annotation class Volatile
|
||||
|
||||
@native
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
public annotation class synchronized
|
||||
public annotation class Synchronized
|
||||
|
||||
public inline fun <R> synchronized(lock: Any, crossinline block: () -> R): R = block()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
package kotlin
|
||||
|
||||
private class ConstrainedOnceSequence<T>(sequence: Sequence<T>) : Sequence<T> {
|
||||
@volatile private var sequenceRef: Sequence<T>? = sequence
|
||||
@Volatile private var sequenceRef: Sequence<T>? = sequence
|
||||
//private val lock = Any()
|
||||
|
||||
//TODO: Synchronize with the synchonized() method
|
||||
|
||||
@@ -189,7 +189,7 @@ private class LazyVal<T>(private val initializer: () -> T) : ReadOnlyProperty<An
|
||||
|
||||
private class BlockingLazyVal<T>(lock: Any?, private val initializer: () -> T) : ReadOnlyProperty<Any?, T> {
|
||||
private val lock = lock ?: this
|
||||
@volatile private var value: Any? = null
|
||||
@Volatile private var value: Any? = null
|
||||
|
||||
public override fun get(thisRef: Any?, property: PropertyMetadata): T {
|
||||
val _v1 = value
|
||||
|
||||
@@ -738,7 +738,7 @@ public fun String.indexOf(char: Char, startIndex: Int = 0, ignoreCase: Boolean =
|
||||
* @param ignoreCase `true` to ignore character case when matching a string. By default `false`.
|
||||
* @returns An index of the first occurrence of [string] or -1 if none is found.
|
||||
*/
|
||||
@kotlin.jvm.jvmOverloads
|
||||
@kotlin.jvm.JvmOverloads
|
||||
public fun String.indexOf(string: String, startIndex: Int = 0, ignoreCase: Boolean = false): Int {
|
||||
return if (ignoreCase)
|
||||
indexOfAny(listOf(string), startIndex, ignoreCase)
|
||||
|
||||
@@ -53,7 +53,7 @@ private object UNINITIALIZED_VALUE
|
||||
|
||||
private open class LazyImpl<out T>(initializer: () -> T) : Lazy<T>(), Serializable {
|
||||
private var initializer: (() -> T)? = initializer
|
||||
@volatile private var _value: Any? = UNINITIALIZED_VALUE
|
||||
@Volatile private var _value: Any? = UNINITIALIZED_VALUE
|
||||
protected open val lock: Any
|
||||
get() = this
|
||||
|
||||
|
||||
Reference in New Issue
Block a user