Commits

Slava Pestov committed ca0b5485841
SIL: Replace SILFunction::ContextGenericParams with a GenericEnvironment This patch is rather large, since it was hard to make this change incrementally, but most of the changes are mechanical. Now that we have a lighter-weight data structure in the AST for mapping interface types to archetypes and vice versa, use that in SIL instead of a GenericParamList. This means that when serializing a SILFunction body, we no longer need to serialize references to archetypes from other modules. Several methods used for forming substitutions can now be moved from GenericParamList to GenericEnvironment. Also, GenericParamList::cloneWithOuterParameters() and GenericParamList::getEmpty() can now go away, since they were only used when SILGen-ing witness thunks. Finally, when printing generic parameters with identical names, the SIL printer used to number them from highest depth to lowest, by walking generic parameter lists starting with the innermost one. Now, ambiguous generic parameters are numbered from lowest depth to highest, by walking the generic signature, which means test output in one of the SILGen tests has changed.