[AST] Stash an archetype builder in an "incomplete" generic environment.

This eliminates the really gross registration of archetype builders
within the ASTContext, and is another little step toward lazily
constructing archetypes.
This commit is contained in:
Doug Gregor
2016-11-30 21:42:10 -08:00
parent 698d25cb3d
commit 6f64658346
9 changed files with 76 additions and 97 deletions

View File

@@ -22,8 +22,9 @@ using namespace swift;
GenericEnvironment::GenericEnvironment(
GenericSignature *signature,
ArchetypeBuilder *builder,
TypeSubstitutionMap interfaceToArchetypeMap)
: Signature(signature)
: Signature(signature), Builder(builder)
{
// Build a mapping in both directions, making sure to canonicalize the
// interface type where it is used as a key, so that substitution can