JVM_IR: do not copy bodies when creating static functions
This commit is contained in:
@@ -504,8 +504,7 @@ fun createStaticFunctionWithReceivers(
|
||||
oldFunction: IrFunction,
|
||||
dispatchReceiverType: IrType? = oldFunction.dispatchReceiverParameter?.type,
|
||||
origin: IrDeclarationOrigin = oldFunction.origin,
|
||||
modality: Modality = Modality.FINAL,
|
||||
copyBody: Boolean = true
|
||||
modality: Modality = Modality.FINAL
|
||||
): IrSimpleFunction {
|
||||
val descriptor = WrappedSimpleFunctionDescriptor(Annotations.EMPTY, oldFunction.descriptor.source)
|
||||
return IrFunctionImpl(
|
||||
@@ -542,10 +541,6 @@ fun createStaticFunctionWithReceivers(
|
||||
oldFunction.valueParameters.map { it.copyTo(this, index = it.index + offset) }
|
||||
)
|
||||
|
||||
if (copyBody) {
|
||||
copyBodyToStatic(oldFunction, this)
|
||||
}
|
||||
|
||||
metadata = oldFunction.metadata
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -237,5 +237,5 @@ class InlineClassLowering(val context: BackendContext) {
|
||||
}
|
||||
|
||||
private fun createStaticBodilessMethod(function: IrFunction): IrSimpleFunction =
|
||||
createStaticFunctionWithReceivers(function.parent, function.name.toInlineClassImplementationName(), function, copyBody = false)
|
||||
createStaticFunctionWithReceivers(function.parent, function.name.toInlineClassImplementationName(), function)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user