mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -3788,6 +3788,14 @@ Type ModuleFile::getType(TypeID TID) {
|
||||
->getCanonicalType());
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::SIL_BOX_TYPE: {
|
||||
TypeID boxID;
|
||||
|
||||
decls_block::SILBoxTypeLayout::readRecord(scratch, boxID);
|
||||
typeOrOffset = SILBoxType::get(getType(boxID)->getCanonicalType());
|
||||
break;
|
||||
}
|
||||
|
||||
case decls_block::SIL_FUNCTION_TYPE: {
|
||||
TypeID interfaceResultID;
|
||||
|
||||
Reference in New Issue
Block a user