mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -4613,6 +4613,14 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
|
||||
|
||||
break;
|
||||
}
|
||||
case SILInstructionKind::AllocPackInst: {
|
||||
SILType Ty;
|
||||
if (parseSILType(Ty))
|
||||
return true;
|
||||
|
||||
ResultVal = B.createAllocPack(InstLoc, Ty);
|
||||
break;
|
||||
}
|
||||
case SILInstructionKind::AllocStackInst: {
|
||||
bool hasDynamicLifetime = false;
|
||||
bool isLexical = false;
|
||||
@@ -4732,6 +4740,11 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
|
||||
return true;
|
||||
ResultVal = B.createDeallocStackRef(InstLoc, Val);
|
||||
break;
|
||||
case SILInstructionKind::DeallocPackInst:
|
||||
if (parseTypedValueRef(Val, B) || parseSILDebugLocation(InstLoc, B))
|
||||
return true;
|
||||
ResultVal = B.createDeallocPack(InstLoc, Val);
|
||||
break;
|
||||
case SILInstructionKind::DeallocRefInst: {
|
||||
if (parseTypedValueRef(Val, B) || parseSILDebugLocation(InstLoc, B))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user