Commits

Slava Pestov committed 2068c5d5e65
AST: Refactor GenericParamList::getForwardingSubstitutions() to use GenericSignature::getSubstitutions(), NFC This is the first, and most trivial, usage of the new GenericSignature::getSubstitutions() method. Note that getForwardingSubstitutions() now takes a GenericSignature, which is slightly awkward. However, this is in line with our goal of 'hollowing out' GenericParamList by removing knowledge of the finalized generic requirements. Also, there is now a new getForwardingSubstitutionMap() function, which returns an interface type substitution mapping. This is used in the new getForwardingSubstitutions() implementation, and all also be used elsewhere later. Finally, in the SILFunction we now cache the forwarding substitutions, instead of re-computing them every time. I doubt this makes a big difference in performance, but it's a simple enhancement and every little bit helps.