JVM_IR make proxy funs for inline and arrayOf funs non-synthetic
This commit is contained in:
committed by
teamcityserver
parent
fcb8f331dc
commit
2a00def84e
+5
-1
@@ -338,7 +338,11 @@ internal class FunctionReferenceLowering(private val context: JvmBackendContext)
|
||||
modality = Modality.FINAL
|
||||
isSuspend = false
|
||||
isInline = false
|
||||
origin = JvmLoweredDeclarationOrigin.PROXY_FUN_FOR_INDY_SAM_CONVERSION
|
||||
origin =
|
||||
if (targetFun.isInline || targetFun.isArrayOf())
|
||||
JvmLoweredDeclarationOrigin.PROXY_FUN_FOR_METAFACTORY
|
||||
else
|
||||
JvmLoweredDeclarationOrigin.SYNTHETIC_PROXY_FUN_FOR_METAFACTORY
|
||||
}.also { proxyFun ->
|
||||
proxyFun.parent = currentDeclarationParent
|
||||
?: throw AssertionError("No declaration parent when processing $reference")
|
||||
|
||||
+2
-1
@@ -382,7 +382,8 @@ internal class LambdaMetafactoryArgumentsBuilder(
|
||||
|
||||
private val adaptableFunctionOrigins = setOf(
|
||||
IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA,
|
||||
JvmLoweredDeclarationOrigin.PROXY_FUN_FOR_INDY_SAM_CONVERSION
|
||||
JvmLoweredDeclarationOrigin.PROXY_FUN_FOR_METAFACTORY,
|
||||
JvmLoweredDeclarationOrigin.SYNTHETIC_PROXY_FUN_FOR_METAFACTORY
|
||||
)
|
||||
|
||||
private fun adaptLambdaSignature(
|
||||
|
||||
+2
-1
@@ -48,5 +48,6 @@ interface JvmLoweredDeclarationOrigin : IrDeclarationOrigin {
|
||||
object ABSTRACT_BRIDGE_STUB : IrDeclarationOriginImpl("ABSTRACT_BRIDGE_STUB")
|
||||
object INVOKEDYNAMIC_CALL_TARGET : IrDeclarationOriginImpl("INVOKEDYNAMIC_CALL_TARGET")
|
||||
object INLINE_LAMBDA : IrDeclarationOriginImpl("INLINE_LAMBDA")
|
||||
object PROXY_FUN_FOR_INDY_SAM_CONVERSION : IrDeclarationOriginImpl("PROXY_FUN_FOR_INDY_SAM_CONVERSION", isSynthetic = true)
|
||||
object PROXY_FUN_FOR_METAFACTORY : IrDeclarationOriginImpl("PROXY_FUN_FOR_METAFACTORY")
|
||||
object SYNTHETIC_PROXY_FUN_FOR_METAFACTORY : IrDeclarationOriginImpl("SYNTHETIC_PROXY_FUN_FOR_METAFACTORY", isSynthetic = true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user