mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SIL] Added strong_copy_weak_value.
The new instruction unwraps an `@sil_weak` box and produces an owned value. It is only legal in opaque values mode and is transformed by `AddressLowering` to `load_weak`.
This commit is contained in:
@@ -1126,17 +1126,19 @@ InlineCost swift::instructionInlineCost(SILInstruction &I) {
|
||||
case SILInstructionKind::Name##ToRefInst: \
|
||||
case SILInstructionKind::RefTo##Name##Inst: \
|
||||
case SILInstructionKind::StrongCopy##Name##ValueInst:
|
||||
#define NEVER_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
case SILInstructionKind::Load##Name##Inst: \
|
||||
case SILInstructionKind::Store##Name##Inst:
|
||||
#define NEVER_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
case SILInstructionKind::Load##Name##Inst: \
|
||||
case SILInstructionKind::Store##Name##Inst: \
|
||||
case SILInstructionKind::StrongCopy##Name##ValueInst:
|
||||
#define ALWAYS_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
COMMON_ALWAYS_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name) \
|
||||
case SILInstructionKind::Name##RetainInst: \
|
||||
case SILInstructionKind::Name##ReleaseInst: \
|
||||
case SILInstructionKind::StrongRetain##Name##Inst:
|
||||
#define SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
NEVER_LOADABLE_CHECKED_REF_STORAGE(Name, "...") \
|
||||
ALWAYS_LOADABLE_CHECKED_REF_STORAGE(Name, "...")
|
||||
#define SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name, ...) \
|
||||
case SILInstructionKind::Load##Name##Inst: \
|
||||
case SILInstructionKind::Store##Name##Inst: \
|
||||
ALWAYS_LOADABLE_CHECKED_REF_STORAGE(Name, "...")
|
||||
#define UNCHECKED_REF_STORAGE(Name, ...) \
|
||||
COMMON_ALWAYS_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name)
|
||||
#include "swift/AST/ReferenceStorage.def"
|
||||
|
||||
Reference in New Issue
Block a user