mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add instructions to allocate and deallocate packs.
Having added these, I'm not entirely sure we couldn't just use alloc_stack and dealloc_stack. Well, if we find ourselves adding a lot of redundancy with those instructions (e.g. around DI), we can always go back and rip these out.
This commit is contained in:
@@ -1083,6 +1083,11 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
|
||||
writeOneTypeLayout(ASI->getKind(), attr, ASI->getElementType());
|
||||
break;
|
||||
}
|
||||
case SILInstructionKind::AllocPackInst: {
|
||||
const AllocPackInst *API = cast<AllocPackInst>(&SI);
|
||||
writeOneTypeLayout(API->getKind(), 0, API->getPackType());
|
||||
break;
|
||||
}
|
||||
case SILInstructionKind::ProjectBoxInst: {
|
||||
auto PBI = cast<ProjectBoxInst>(&SI);
|
||||
|
||||
@@ -1482,6 +1487,7 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
|
||||
case SILInstructionKind::SetDeallocatingInst:
|
||||
case SILInstructionKind::DeallocStackInst:
|
||||
case SILInstructionKind::DeallocStackRefInst:
|
||||
case SILInstructionKind::DeallocPackInst:
|
||||
case SILInstructionKind::DeallocRefInst:
|
||||
case SILInstructionKind::DeinitExistentialAddrInst:
|
||||
case SILInstructionKind::DeinitExistentialValueInst:
|
||||
|
||||
Reference in New Issue
Block a user