[serialization] Add support for ArrayTypes.

...in a quest for completeness. ArrayTypes don't actually work yet
(single-dimensional arrays are typed as slices), but when they do the test
that is currently XFAIL'd should start passing.

With this, all non-transient types can now be serialized and deserialized.

Swift SVN r6101
This commit is contained in:
Jordan Rose
2013-07-09 23:45:46 +00:00
parent e7aad15272
commit ad9875c19e
5 changed files with 49 additions and 2 deletions

View File

@@ -215,6 +215,7 @@ namespace decls_block {
BOUND_GENERIC_SUBSTITUTION,
POLYMORPHIC_FUNCTION_TYPE,
ARRAY_SLICE_TYPE,
ARRAY_TYPE,
REFERENCE_STORAGE_TYPE,
TYPE_ALIAS_DECL = 100,
@@ -358,6 +359,12 @@ namespace decls_block {
TypeIDField // implementation type
>;
using ArrayTypeLayout = BCRecordLayout<
ARRAY_TYPE,
TypeIDField, // element type
BCVBR<8> // size
>;
using ReferenceStorageTypeLayout = BCRecordLayout<
REFERENCE_STORAGE_TYPE,
BCFixed<1>, // ownership