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

@@ -695,8 +695,9 @@ Serializer::writeConformances(ArrayRef<ProtocolDecl *> protocols,
SmallVector<DeclID, 16> data;
for (auto valueMapping : conf->Mapping) {
// FIXME: Serialize witness substitutions.
data.push_back(addDeclRef(valueMapping.first));
data.push_back(addDeclRef(valueMapping.second));
data.push_back(addDeclRef(valueMapping.second.Decl));
}
for (auto typeMapping : conf->TypeMapping) {
data.push_back(addTypeRef(typeMapping.first));