Commits

Joe Groff committed 61f227c071f
Refactor ArchetypeBuilder to work with abstract generic parameters. Have ArchetypeBuilder key the archetypes it produces by the abstract {depth,index} position of generic parameters rather than by the identity of particular GenericTypeParamDecls. Tighten the signature of AbstractTypeParamDecl-taking methods to only take GenericTypeParamDecls; that's the only case that comes up anymore. Introduce 'addGenericParameter' and 'getArchetype' overloads that work with GenericTypeParamTypes and DependentMemberTypes in addition to those that work with GenericTypeParamDecls. Move ArchetypeBuilder.cpp from 'Sema' to 'AST' to correspond to its header's location. In this version of the patch, we handle the problem of invalid nested protocol decls by simply ignoring the parent generic context of ProtocolDecls in validateGenericTypeSignature, which allows for better recovery and avoids the crash problems with the ErrorType approach I tried in the previous patch. Swift SVN r10983