IR: avoid some calls of getUniqId()
This commit is contained in:
+8
-8
@@ -564,14 +564,6 @@ abstract class KotlinIrLinker(
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
val descriptorUniqId = topLevelDescriptor.getUniqId()
|
|
||||||
?: if (tolerateNonKlibDescriptors) {
|
|
||||||
return null
|
|
||||||
} else {
|
|
||||||
error("Could not get descriptor uniq id for $topLevelDescriptor")
|
|
||||||
}
|
|
||||||
val topLevelKey = UniqId(descriptorUniqId)
|
|
||||||
|
|
||||||
val moduleOfOrigin = topLevelDescriptor.module
|
val moduleOfOrigin = topLevelDescriptor.module
|
||||||
|
|
||||||
val moduleDeserializer = deserializersForModules[moduleOfOrigin] ?:
|
val moduleDeserializer = deserializersForModules[moduleOfOrigin] ?:
|
||||||
@@ -581,6 +573,14 @@ abstract class KotlinIrLinker(
|
|||||||
error("No module deserializer found for $moduleOfOrigin")
|
error("No module deserializer found for $moduleOfOrigin")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val descriptorUniqId = topLevelDescriptor.getUniqId()
|
||||||
|
?: if (tolerateNonKlibDescriptors) {
|
||||||
|
return null
|
||||||
|
} else {
|
||||||
|
error("Could not get descriptor uniq id for $topLevelDescriptor")
|
||||||
|
}
|
||||||
|
val topLevelKey = UniqId(descriptorUniqId)
|
||||||
|
|
||||||
moduleDeserializer.addModuleReachableTopLevel(topLevelKey)
|
moduleDeserializer.addModuleReachableTopLevel(topLevelKey)
|
||||||
|
|
||||||
deserializeAllReachableTopLevels()
|
deserializeAllReachableTopLevels()
|
||||||
|
|||||||
Reference in New Issue
Block a user