Commits

Slava Pestov committed 5b89f7fd6a5
SIL: Use interface types in the SIL parser The SIL parser used PolymorphicFunctionType in two places: - Internals of SILFunctionType parsing - Overload selection for class_method / super_method / dynamic_method instructions It is better to have Sema construct GenericFunctionType directly in SIL mode. In particular, the overload selection logic is simpler now, since it does not have to deal with the fact that PolymorphicFunctionTypes do not canonicalize. Mostly NFC, except the SIL printer output is a bit different; for a generic method on a generic type, the type parameters all come first, like ``<T><U> G<T> -> (U) -> ()'' -vs- ``<T> G<T> -> <U> (U) -> ()''. Also, generic constraints look different, instead of ``<`Self` : P>`` we now have ``<Self where Self : P>''. This patch has two consequences that will become important later: - While code that constructs PolymorphicFunctionType still exists in Sema, the SIL parser was the last major component that *consumed* PolymorphicFunctionType. - Everywhere we set SILFunction::ContextGenericParams, we now have a well-formed context GenericSignature available, allowing ContextGenericParams to be replaced by a GenericSignature eventually.