Serialization: Remove an old hack

SILFunctions no longer have a GenericParamList, so all of these
circularity and ordering problems are gone.

We *do* deserialize the generic parameters before creating decls
that have them though, so serialize generic parameters as if
their DeclContext was the DeclContext of the owner decl.

This is what we do when we parse generic parameters too; in
both cases, the constructor for the owner decl gives the
generic parameters the right DeclContext.
This commit is contained in:
Slava Pestov
2018-08-10 14:13:19 -07:00
parent 038a55757d
commit 6812fd63b8
4 changed files with 18 additions and 50 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 = 432; // Last change: default argument text
const uint16_t VERSION_MINOR = 433; // Last change: GenericTypeParamDecl doesn't need a DC
using DeclIDField = BCFixed<31>;
@@ -871,7 +871,6 @@ namespace decls_block {
using GenericTypeParamDeclLayout = BCRecordLayout<
GENERIC_TYPE_PARAM_DECL,
IdentifierIDField, // name
DeclContextIDField, // context decl
BCFixed<1>, // implicit flag
BCVBR<4>, // depth
BCVBR<4> // index