[serialization] Break a cyclic dependency involving associated types.

The standard library likes to have default definitions for associated types,
which is good. Often the /choice/ of default type, however, is a type that
(indirectly) conforms to the very protocol containing the associated type.
Rather than try to make sure everything is present all at once, just delay
the deserialization of the default definition until it's actually requested.

This does swell the size of AssociatedTypeDecl by two words. I've filed
<rdar://problem/16266669> to remind myself to try to reduce this.

Part of <rdar://problem/16257259>

Swift SVN r14809
This commit is contained in:
Jordan Rose
2014-03-08 00:07:29 +00:00
parent dece63903f
commit b9d1e14dd6
6 changed files with 56 additions and 11 deletions

View File

@@ -485,6 +485,9 @@ public:
virtual ArrayRef<Decl *> loadAllMembers(const Decl *D,
uint64_t contextData) override;
virtual TypeLoc loadAssociatedTypeDefault(const AssociatedTypeDecl *ATD,
uint64_t contextData) override;
};
} // end namespace swift