[FIR] optimize direct allocation of empty ConeTypeProjection arrays

On the snapshot from KTIJ-26260 empty ConeTypeProjection arrays take about 10mb
This commit is contained in:
Ilya Kirillov
2023-08-17 16:10:28 +02:00
committed by Space Team
parent 04d330edae
commit bdfc68468f
19 changed files with 35 additions and 24 deletions
@@ -43,7 +43,7 @@ class FirNumberSignAttributeExtension(session: FirSession) : FirTypeAttributeExt
annotationTypeRef = buildResolvedTypeRef {
type = ConeClassLikeTypeImpl(
classId.toLookupTag(),
emptyArray(),
ConeTypeProjection.EMPTY_ARRAY,
isNullable = false
)
}
@@ -78,7 +78,7 @@ object FirParcelizeClassChecker : FirClassChecker() {
val superType = superTypeRef.coneType
val parcelableType = ConeClassLikeTypeImpl(
PARCELABLE_ID.toLookupTag(),
emptyArray(),
ConeTypeProjection.EMPTY_ARRAY,
isNullable = false
)
if (superType.isSubtypeOf(parcelableType, context.session)) {