JVM IR: minor, optimize forceSingleValueParameterBoxing
In JVM IR, both `valueParameters` and `isFromJavaOrBuiltins` take noticeable time (1% of all compilation) because the logic for these in IrBasedDescriptors is not trivial.
This commit is contained in:
+3
-1
@@ -228,7 +228,9 @@ class MethodSignatureMapper(private val context: JvmBackendContext) {
|
||||
else -> JvmMethodParameterKind.VALUE
|
||||
}
|
||||
val type =
|
||||
if (forceSingleValueParameterBoxing(function.toIrBasedDescriptor())) parameter.type.makeNullable() else parameter.type
|
||||
if (function.name.asString() == "remove" && forceSingleValueParameterBoxing(function.toIrBasedDescriptor()))
|
||||
parameter.type.makeNullable()
|
||||
else parameter.type
|
||||
writeParameter(sw, kind, type, function)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user