Reduce type parameters and associated types' dependence on "getProtocols()".

This is a step toward weeding out the "getProtocols()" list on
TypeDecl. Now, use the Archetype's list of protocols for the set of
protocols to which the type parameter or associated type
conforms. Since that list is fully canonicalized, it's more generally
reliable. However, start serializing the list of inherited types for a
generic type parameter, so we can print it appropriately.

Swift SVN r31297
This commit is contained in:
Doug Gregor
2015-08-18 17:57:37 +00:00
parent e78b3dd44e
commit 9c82081e3f
7 changed files with 32 additions and 25 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 210; // Last change: nothrow flag in apply_inst
const uint16_t VERSION_MINOR = 211; // Last change: generic param inherited list
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -755,7 +755,7 @@ namespace decls_block {
BCVBR<4>, // index
TypeIDField, // superclass type
TypeIDField, // archetype type
BCArray<DeclIDField> // protocols
BCArray<TypeIDField> // inherited types
>;
using AssociatedTypeDeclLayout = BCRecordLayout<