[AST] Replace SubstitutionList in NameAliasType with a SubstitutionMap.

Convert NameAliasType’s internal representation from tail-allocating an
array of Substitutions (to be treated as a SubstitutionList) to store a
single SubstitutionMap. Serialize using that SubstitutionMap.
This commit is contained in:
Doug Gregor
2018-04-30 16:23:14 -07:00
parent ab56fa3e9c
commit df97e44eb9
7 changed files with 61 additions and 97 deletions

View File

@@ -55,7 +55,7 @@ const uint16_t VERSION_MAJOR = 0;
/// describe what change you made. The content of this comment isn't important;
/// it just ensures a conflict if two people change the module format.
/// Don't worry about adhering to the 80-column limit for this line.
const uint16_t VERSION_MINOR = 409; // Last change: standalone requirement subs
const uint16_t VERSION_MINOR = 410; // Last change: NameAlias substitution map
using DeclIDField = BCFixed<31>;
@@ -654,10 +654,10 @@ namespace decls_block {
using NameAliasTypeLayout = BCRecordLayout<
NAME_ALIAS_TYPE,
DeclIDField, // typealias decl
TypeIDField, // parent type
TypeIDField // underlying type
// trailing substitutions
DeclIDField, // typealias decl
TypeIDField, // parent type
TypeIDField, // underlying type
SubstitutionMapIDField // substitution map
>;
using GenericTypeParamTypeLayout = BCRecordLayout<