[JS IC] Don't serialize IrTypeAbbreviation in IC cache
This commit is contained in:
committed by
teamcityserver
parent
d174e8c3d2
commit
67f814c99f
+20
-10
@@ -399,8 +399,10 @@ open class IrFileSerializer(
|
|||||||
.addAllAnnotation(serializeAnnotations(type.annotations))
|
.addAllAnnotation(serializeAnnotations(type.annotations))
|
||||||
.setClassifier(serializeIrSymbol(type.classifier))
|
.setClassifier(serializeIrSymbol(type.classifier))
|
||||||
.setHasQuestionMark(type.hasQuestionMark)
|
.setHasQuestionMark(type.hasQuestionMark)
|
||||||
type.abbreviation?.let {
|
type.abbreviation?.let { ta ->
|
||||||
proto.setAbbreviation(serializeIrTypeAbbreviation(it))
|
serializeIrTypeAbbreviation(ta)?.let { pta ->
|
||||||
|
proto.setAbbreviation(pta)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type.arguments.forEach {
|
type.arguments.forEach {
|
||||||
proto.addArgument(serializeTypeArgument(it))
|
proto.addArgument(serializeTypeArgument(it))
|
||||||
@@ -408,15 +410,23 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation {
|
@Suppress("UNUSED_PARAMETER")
|
||||||
val proto = ProtoTypeAbbreviation.newBuilder()
|
private fun isTypeAbbreviationAccessibleHere(typeAbbreviation: IrTypeAbbreviation): Boolean {
|
||||||
.addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
|
return !skipMutableState
|
||||||
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
|
}
|
||||||
.setHasQuestionMark(typeAbbreviation.hasQuestionMark)
|
|
||||||
typeAbbreviation.arguments.forEach {
|
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation? {
|
||||||
proto.addArgument(serializeTypeArgument(it))
|
if (isTypeAbbreviationAccessibleHere(typeAbbreviation)) {
|
||||||
|
val proto = ProtoTypeAbbreviation.newBuilder()
|
||||||
|
.addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
|
||||||
|
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
|
||||||
|
.setHasQuestionMark(typeAbbreviation.hasQuestionMark)
|
||||||
|
typeAbbreviation.arguments.forEach {
|
||||||
|
proto.addArgument(serializeTypeArgument(it))
|
||||||
|
}
|
||||||
|
return proto.build()
|
||||||
}
|
}
|
||||||
return proto.build()
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
|
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
|
||||||
|
|||||||
Reference in New Issue
Block a user