Fix for #1811
This commit is contained in:
committed by
Sergey Bogolepov
parent
09427e3a70
commit
6d5a812952
+1
-1
@@ -673,7 +673,6 @@ internal class FunctionGenerationContext(val function: LLVMValueRef,
|
||||
|
||||
fun getObjectValue(
|
||||
descriptor: ClassDescriptor,
|
||||
shared: Boolean,
|
||||
exceptionHandler: ExceptionHandler,
|
||||
locationInfo: LocationInfo?
|
||||
): LLVMValueRef {
|
||||
@@ -695,6 +694,7 @@ internal class FunctionGenerationContext(val function: LLVMValueRef,
|
||||
}
|
||||
}
|
||||
|
||||
val shared = descriptor.symbol.objectIsShared && context.config.threadsAreAllowed
|
||||
val objectPtr = codegen.getObjectInstanceStorage(descriptor, shared)
|
||||
val bbCurrent = currentBlock
|
||||
val bbInit= basicBlock("label_init", locationInfo)
|
||||
|
||||
-1
@@ -811,7 +811,6 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
|
||||
private fun evaluateGetObjectValue(value: IrGetObjectValue): LLVMValueRef =
|
||||
functionGenerationContext.getObjectValue(
|
||||
value.symbol.owner,
|
||||
value.symbol.objectIsShared && context.config.threadsAreAllowed,
|
||||
currentCodeContext.exceptionHandler,
|
||||
value.startLocation
|
||||
)
|
||||
|
||||
+1
-2
@@ -1044,8 +1044,7 @@ private fun ObjCExportCodeGenerator.createObjectInstanceAdapter(
|
||||
|
||||
return generateObjCToKotlinSyntheticGetter(selector) {
|
||||
initRuntimeIfNeeded() // For instance methods it gets called when allocating.
|
||||
|
||||
val value = getObjectValue(context.ir.get(descriptor), shared = false, locationInfo = null, exceptionHandler = ExceptionHandler.Caller)
|
||||
val value = getObjectValue(context.ir.get(descriptor), locationInfo = null, exceptionHandler = ExceptionHandler.Caller)
|
||||
ret(kotlinToObjC(value, ReferenceBridge))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user