Introduce a "@box T" type for SIL.

Represents a heap allocation containing a value of type T, which we'll be able to use to represent the payloads of indirect enum cases, and also improve codegen of current boxes, which generates non-uniqued box metadata on every allocation, which is dumb. No codegen changes or IRGen support yet; that will come later.

This time, fix a paste-o that caused SILBlockStorageTypes to get replaced with SILBoxTypes during type substitution. Oops.

Swift SVN r29489
This commit is contained in:
Joe Groff
2015-06-18 15:21:52 +00:00
parent 7bf996152b
commit e57c470019
25 changed files with 168 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 202; // Last change: xref protocol vs. ext
const uint16_t VERSION_MINOR = 203; // Last change: add @box type
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -701,6 +701,11 @@ namespace decls_block {
TypeIDField // capture type
>;
using SILBoxTypeLayout = BCRecordLayout<
SIL_BOX_TYPE,
TypeIDField // capture type
>;
template <unsigned Code>
using SyntaxSugarTypeLayout = BCRecordLayout<
Code,