[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:
committed by
Space Team
parent
70996035fc
commit
059046a2b1
@@ -151,9 +151,15 @@ object AbstractTypeMapper {
|
||||
materialized: Boolean
|
||||
): Type {
|
||||
val typeArgument = type.asArgumentList()[0]
|
||||
val (variance, memberType) = when {
|
||||
typeArgument.isStarProjection() -> Variance.OUT_VARIANCE to nullableAnyType()
|
||||
else -> typeArgument.getVariance().toVariance() to typeArgument.getType()
|
||||
val variance: Variance
|
||||
val memberType: KotlinTypeMarker
|
||||
|
||||
if (typeArgument.isStarProjection()) {
|
||||
variance = Variance.OUT_VARIANCE
|
||||
memberType = nullableAnyType()
|
||||
} else {
|
||||
variance = typeArgument.getVariance().toVariance()
|
||||
memberType = typeArgument.getType()
|
||||
}
|
||||
|
||||
val arrayElementType: Type
|
||||
|
||||
Reference in New Issue
Block a user