Minor in JS stdlib: annotate volatile and synchronized as native.

Don't generate code for this classes to avoid warnings from some minifiers.
Note: volatile and synchronized was reserved word in ECMAScript 2, but is not since ECMAScript 5.
This commit is contained in:
Zalim Bashorov
2014-11-25 17:30:56 +03:00
parent 2a334fc8f5
commit 04f6d50423
+7
View File
@@ -18,8 +18,15 @@ package kotlin
import kotlin.InlineOption.ONLY_LOCAL_RETURN
// Note:
// Right now we don't want to have neither 'volatile' nor 'synchronized' at runtime,
// so they annotated as 'native' to avoid warnings/errors from some minifiers.
// They was reserved word in ECMAScript 2, but is not since ECMAScript 5.
native
public annotation class volatile
native
public annotation class synchronized
public inline fun <R> synchronized(lock: Any, [inlineOptions(ONLY_LOCAL_RETURN)] block: () -> R): R = block()