[K/N] Introduce intrinsic constant constructors
This commit is contained in:
@@ -100,6 +100,10 @@ internal annotation class PointsTo(vararg val onWhom: Int)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
internal annotation class TypedIntrinsic(val kind: String)
|
||||
|
||||
@Target(AnnotationTarget.CONSTRUCTOR)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
internal annotation class ConstantConstructorIntrinsic(val kind: String)
|
||||
|
||||
/**
|
||||
* Indicates that `@SymbolName external` function is implemented in library-stored bitcode
|
||||
* and doesn't have native dependencies.
|
||||
|
||||
@@ -9,6 +9,11 @@ import kotlin.reflect.KClass
|
||||
|
||||
@ExportForCompiler
|
||||
internal class KClassImpl<T : Any>(private val typeInfo: NativePtr) : KClass<T> {
|
||||
|
||||
@ExportForCompiler
|
||||
@ConstantConstructorIntrinsic("KCLASS_IMPL")
|
||||
constructor() : this(TODO("This is intrinsic constructor and it shouldn't be used directly"))
|
||||
|
||||
// TODO: consider replacing '$' by another delimeter that can't be used in class name specified with backticks (``)
|
||||
override val simpleName: String?
|
||||
get() = getRelativeName(typeInfo, true)?.substringAfterLast('.')?.substringAfterLast('$')
|
||||
|
||||
Reference in New Issue
Block a user