AST: Add slot for substitutions for generic witnesses.

If a protocol requirement is satisfied by a generic method, we'll need to save the substitutions necessary to call that method from the witness thunk. This patch adds the spot in the ProtocolConformance::Mapping to save the substitutions; for now, always leave it empty and update the code for the type change.

Swift SVN r6399
This commit is contained in:
Joe Groff
2013-07-20 00:08:43 +00:00
parent 400cf8050e
commit 10f290a01d
10 changed files with 50 additions and 21 deletions

View File

@@ -261,7 +261,9 @@ ModuleFile::maybeReadConformance() {
while (valueCount--) {
auto first = cast<ValueDecl>(getDecl(*rawIDIter++));
auto second = cast<ValueDecl>(getDecl(*rawIDIter++));
conformance->Mapping.insert(std::make_pair(first, second));
// FIXME: Deserialize witness substitutions.
ProtocolConformanceWitness witness{second, {}};
conformance->Mapping.insert(std::make_pair(first, witness));
}
while (typeCount--) {
auto first = getType(*rawIDIter++)->castTo<SubstitutableType>();