mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[SIL] NFC: Simplify SILVTable and save 8 bytes per SILVTable
We were not using the primary benefits of an intrusive list, namely the ability to insert or remove from the middle of the list, so let's switch to a plain vector. This also avoids linked-list pointer chasing.
This commit is contained in:
@@ -2659,10 +2659,10 @@ void SILSerializer::writeSILBlock(const SILModule *SILMod) {
|
||||
// Go through all SILVTables in SILMod and write them if we should
|
||||
// serialize everything.
|
||||
// FIXME: Resilience: could write out vtable for fragile classes.
|
||||
for (const SILVTable &vt : SILMod->getVTables()) {
|
||||
if ((ShouldSerializeAll || vt.isSerialized()) &&
|
||||
SILMod->shouldSerializeEntitiesAssociatedWithDeclContext(vt.getClass()))
|
||||
writeSILVTable(vt);
|
||||
for (const auto &vt : SILMod->getVTables()) {
|
||||
if ((ShouldSerializeAll || vt->isSerialized()) &&
|
||||
SILMod->shouldSerializeEntitiesAssociatedWithDeclContext(vt->getClass()))
|
||||
writeSILVTable(*vt);
|
||||
}
|
||||
|
||||
// Write out property descriptors.
|
||||
|
||||
Reference in New Issue
Block a user