This commit is contained in:
Sergey Bogolepov
2018-08-08 14:07:05 +03:00
committed by Sergey Bogolepov
parent 09427e3a70
commit 6d5a812952
3 changed files with 2 additions and 4 deletions
@@ -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)
@@ -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
)
@@ -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))
}
}