More cleanup: lift return / assignment out
This commit is contained in:
+6
-6
@@ -903,11 +903,11 @@ class ExpressionCodegen(
|
||||
}
|
||||
if (descriptor is CallableMemberDescriptor && JvmCodegenUtil.getDirectMember(descriptor) is SyntheticJavaPropertyDescriptor) {
|
||||
val propertyDescriptor = JvmCodegenUtil.getDirectMember(descriptor) as SyntheticJavaPropertyDescriptor
|
||||
if (descriptor is PropertyGetterDescriptor) {
|
||||
descriptor = propertyDescriptor.getMethod
|
||||
descriptor = if (descriptor is PropertyGetterDescriptor) {
|
||||
propertyDescriptor.getMethod
|
||||
}
|
||||
else {
|
||||
descriptor = propertyDescriptor.setMethod!!
|
||||
propertyDescriptor.setMethod!!
|
||||
}
|
||||
}
|
||||
return typeMapper.mapToCallableMethod(descriptor as FunctionDescriptor, isSuper)
|
||||
@@ -935,11 +935,11 @@ class ExpressionCodegen(
|
||||
if (!isInline) return IrCallGenerator.DefaultCallGenerator
|
||||
|
||||
val original = unwrapInitialSignatureDescriptor(DescriptorUtils.unwrapFakeOverride(descriptor.original as FunctionDescriptor))
|
||||
if (isDefaultCompilation) {
|
||||
return TODO()
|
||||
return if (isDefaultCompilation) {
|
||||
TODO()
|
||||
}
|
||||
else {
|
||||
return IrInlineCodegen(this, state, original, typeParameterMappings!!, IrSourceCompilerForInline(state, element))
|
||||
IrInlineCodegen(this, state, original, typeParameterMappings!!, IrSourceCompilerForInline(state, element))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -412,11 +412,11 @@ class EnumClassLowering(val context: JvmBackendContext) : ClassLoweringPass {
|
||||
|
||||
override fun visitGetValue(expression: IrGetValue): IrExpression {
|
||||
val loweredParameter = loweredEnumConstructorParameters[expression.descriptor]
|
||||
if (loweredParameter != null) {
|
||||
return IrGetValueImpl(expression.startOffset, expression.endOffset, loweredParameter, expression.origin)
|
||||
return if (loweredParameter != null) {
|
||||
IrGetValueImpl(expression.startOffset, expression.endOffset, loweredParameter, expression.origin)
|
||||
}
|
||||
else {
|
||||
return expression
|
||||
expression
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user