Drop kotlin.jvm.internal.Intrinsic, use only one mechanism for intrinsics

This commit is contained in:
Alexander Udalov
2015-07-28 19:45:42 +03:00
parent 6048ebf871
commit c10cc30f40
8 changed files with 28 additions and 87 deletions
@@ -16,14 +16,10 @@
package kotlin.jvm.internal.unsafe
import kotlin.jvm.internal.Intrinsic
/** @suppress */
@Intrinsic("kotlin.jvm.internal.unsafe.monitorEnter")
@Deprecated("This function supports the standard library infrastructure and is not intended to be used directly from user code.", level = DeprecationLevel.ERROR)
public fun monitorEnter(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
/** @suppress */
@Intrinsic("kotlin.jvm.internal.unsafe.monitorExit")
@Deprecated("This function supports the standard library infrastructure and is not intended to be used directly from user code.", level = DeprecationLevel.ERROR)
public fun monitorExit(monitor: Any): Unit = throw UnsupportedOperationException("This function can only be used privately")
@@ -3,7 +3,6 @@
package kotlin
import java.lang.reflect.Method
import kotlin.jvm.internal.Intrinsic
import kotlin.reflect.KClass
/**
@@ -31,7 +30,6 @@ public annotation class throws(public vararg val exceptionClasses: KClass<out Th
/**
* Returns the runtime Java class of this object.
*/
@Intrinsic("kotlin.javaClass.property")
@Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN)
public val <T: Any> T.javaClass : Class<T>
get() = (this as java.lang.Object).getClass() as Class<T>
@@ -39,7 +37,6 @@ public val <T: Any> T.javaClass : Class<T>
/**
* Returns the Java class for the specified type.
*/
@Intrinsic("kotlin.javaClass.function")
@Suppress("REIFIED_TYPE_PARAMETER_NO_INLINE")
@Deprecated("Use the class reference and .java extension property instead: MyClass::class.java", ReplaceWith("T::class.java"))
public fun <reified T: Any> javaClass(): Class<T> = T::class.java