[serialization] Add support for extensions.

Currently, we are eagerly deserializing extensions. This probably isn't
what we want to do in the long run, but until lookup settles down a bit
it's not worth optimizing.

Swift SVN r6186
This commit is contained in:
Jordan Rose
2013-07-11 23:35:19 +00:00
parent d1163afb4b
commit 37d9ae4e09
3 changed files with 96 additions and 22 deletions

View File

@@ -241,6 +241,7 @@ namespace decls_block {
ONEOF_DECL,
ONEOF_ELEMENT_DECL,
SUBSCRIPT_DECL,
EXTENSION_DECL,
PAREN_PATTERN = 200,
TUPLE_PATTERN,
@@ -498,6 +499,15 @@ namespace decls_block {
// The indices pattern trails the record.
>;
using ExtensionLayout = BCRecordLayout<
EXTENSION_DECL,
TypeIDField, // base type
DeclIDField, // context decl
BCFixed<1>, // implicit flag
BCArray<TypeIDField> // inherited types
// Trailed by conformance info (if any), then the decl context record.
>;
using ParenPatternLayout = BCRecordLayout<
PAREN_PATTERN