mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user