[serialization] Add support for destructors.

With this commit, we can now serialize all of stdlib_core!
(Deserializing still has a few issues.)

Swift SVN r6188
This commit is contained in:
Jordan Rose
2013-07-11 23:35:34 +00:00
parent e0301b6037
commit c699b84cfa
3 changed files with 55 additions and 3 deletions

View File

@@ -243,6 +243,7 @@ namespace decls_block {
ONEOF_ELEMENT_DECL,
SUBSCRIPT_DECL,
EXTENSION_DECL,
DESTRUCTOR_DECL,
PAREN_PATTERN = 200,
TUPLE_PATTERN,
@@ -432,7 +433,8 @@ namespace decls_block {
BCFixed<1>, // implicit flag
TypeIDField, // type (signature)
DeclIDField // implicit this decl
// Trailed by its generic parameters, if any.
// Trailed by its generic parameters, if any, followed by the parameter
// pattern.
>;
using VarLayout = BCRecordLayout<
@@ -567,6 +569,14 @@ namespace decls_block {
// The sub-pattern trails the record.
>;
using DestructorLayout = BCRecordLayout<
DESTRUCTOR_DECL,
DeclIDField, // context decl
BCFixed<1>, // implicit flag
TypeIDField, // type (signature)
DeclIDField // implicit this decl
>;
using GenericParamListLayout = BCRecordLayout<
GENERIC_PARAM_LIST,