RUNTIME: grant access to symvols marked with konan.internal.ExportForCompiler
This commit is contained in:
committed by
vvlevchenko
parent
47a5e13ff3
commit
458aa058c0
+6
@@ -33,6 +33,10 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
|
|||||||
// Treat any `@ExportForCppRuntime` declaration as exported.
|
// Treat any `@ExportForCppRuntime` declaration as exported.
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (this.annotations.hasAnnotation(exportForCompilerAnnotation)){
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) {
|
if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) {
|
||||||
// Currently code generator can access the constructor of the singleton,
|
// Currently code generator can access the constructor of the singleton,
|
||||||
@@ -58,6 +62,8 @@ private val symbolNameAnnotation = FqName("konan.SymbolName")
|
|||||||
|
|
||||||
private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime")
|
private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime")
|
||||||
|
|
||||||
|
private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler")
|
||||||
|
|
||||||
private fun typeToHashString(type: KotlinType): String {
|
private fun typeToHashString(type: KotlinType): String {
|
||||||
if (TypeUtils.isTypeParameter(type)) return "GENERIC"
|
if (TypeUtils.isTypeParameter(type)) return "GENERIC"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user