[JVM] Micro-optimize method signature mapping

This commit optimizes functions related to method signature mapping on
the JVM backend. The most significant change is avoiding re-allocations
in StringBuilder when building internal names. The commit also includes
minor optimizations, such as removing redundant allocations of strings
and other objects.
This commit is contained in:
Iaroslav Postovalov
2023-08-29 23:44:17 +06:00
committed by Space Team
parent 70996035fc
commit 059046a2b1
10 changed files with 58 additions and 27 deletions
@@ -93,7 +93,7 @@ internal fun CallableDescriptor.computeJvmSignature(): String? = signatures {
internal val ClassDescriptor.internalName: String
get() {
JavaToKotlinClassMap.mapKotlinToJava(fqNameSafe.toUnsafe())?.let {
return JvmClassName.byClassId(it).internalName
return JvmClassName.internalNameByClassId(it)
}
return computeInternalName(this)