Explicitly referenced possible super types of forward declarations
This commit is contained in:
committed by
Ilya Matveev
parent
87c852fb1d
commit
6931220c82
+1
@@ -35,6 +35,7 @@ internal class InteropBuiltIns(builtIns: KonanBuiltIns) {
|
|||||||
val cValuesRef = this.packageScope.getContributedClass("CValuesRef")
|
val cValuesRef = this.packageScope.getContributedClass("CValuesRef")
|
||||||
val cValues = this.packageScope.getContributedClass("CValues")
|
val cValues = this.packageScope.getContributedClass("CValues")
|
||||||
val cValue = this.packageScope.getContributedClass("CValue")
|
val cValue = this.packageScope.getContributedClass("CValue")
|
||||||
|
val cOpaque = this.packageScope.getContributedClass("COpaque")
|
||||||
val cValueWrite = this.packageScope.getContributedFunctions("write")
|
val cValueWrite = this.packageScope.getContributedFunctions("write")
|
||||||
.single { it.extensionReceiverParameter?.type?.constructor?.declarationDescriptor == cValue }
|
.single { it.extensionReceiverParameter?.type?.constructor?.declarationDescriptor == cValue }
|
||||||
val cValueRead = this.packageScope.getContributedFunctions("readValue")
|
val cValueRead = this.packageScope.getContributedFunctions("readValue")
|
||||||
|
|||||||
+6
@@ -206,6 +206,12 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
|
|||||||
|
|
||||||
val interopAllocObjCObject = symbolTable.referenceSimpleFunction(context.interopBuiltIns.allocObjCObject)
|
val interopAllocObjCObject = symbolTable.referenceSimpleFunction(context.interopBuiltIns.allocObjCObject)
|
||||||
|
|
||||||
|
// These are possible supertypes of forward declarations - we need to reference them explicitly to force their deserialization.
|
||||||
|
// TODO: Do it lazily.
|
||||||
|
val interopCOpaque = symbolTable.referenceClass(context.interopBuiltIns.cOpaque)
|
||||||
|
val interopObjCObject = symbolTable.referenceClass(context.interopBuiltIns.objCObject)
|
||||||
|
val interopObjCObjectBase = symbolTable.referenceClass(context.interopBuiltIns.objCObjectBase)
|
||||||
|
|
||||||
val interopObjCRelease = interopFunction("objc_release")
|
val interopObjCRelease = interopFunction("objc_release")
|
||||||
|
|
||||||
val interopObjCRetain = interopFunction("objc_retain")
|
val interopObjCRetain = interopFunction("objc_retain")
|
||||||
|
|||||||
Reference in New Issue
Block a user