mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[deserialization] Enable lazy deserialization of witness tables.
This patch adds in the necessary infrastructure for lazily deserializing witness tables. This is done by following the same approach as the deserialization/serialization of SILFunction. Now if one calls SILModule::lookUpWitnessTable and the given witness table is a definition, the SILModule will attempt to deserialize it from one of the other modules. Swift SVN r15403
This commit is contained in:
@@ -58,6 +58,13 @@ SILVTable *SerializedSILLoader::lookupVTable(Identifier Name) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SILWitnessTable *SerializedSILLoader::lookupWitnessTable(SILWitnessTable *WT) {
|
||||
for (auto &Des : LoadedSILSections)
|
||||
if (auto wT = Des->lookupWitnessTable(WT))
|
||||
return wT;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void SerializedSILLoader::getAll() {
|
||||
for (auto &Des : LoadedSILSections)
|
||||
Des->getAll();
|
||||
|
||||
Reference in New Issue
Block a user