Remove property behaviors

This commit is contained in:
Slava Pestov
2018-12-07 18:07:35 -05:00
parent e160b85f8f
commit aa747dcd81
54 changed files with 31 additions and 2571 deletions

View File

@@ -3685,78 +3685,6 @@ public:
}
};
/// MarkUninitializedBehaviorInst - Indicates that a logical property
/// is uninitialized at this point and needs to be initialized by the end of the
/// function and before any escape point for this instruction. Assignments
/// to the property trigger the behavior's `init` or `set` logic based on
/// the logical initialization state of the property.
///
/// This is only valid in Raw SIL.
class MarkUninitializedBehaviorInst final
: public InstructionBase<SILInstructionKind::MarkUninitializedBehaviorInst,
SingleValueInstruction>
{
friend SILBuilder;
FixedOperandList<4> Operands;
SubstitutionMap InitStorageSubstitutions;
SubstitutionMap SetterSubstitutions;
enum {
// The initialization function for the storage.
InitStorageFunc,
// Address of the behavior storage being initialized.
Storage,
// The setter function for the behavior property.
SetterFunc,
// The address or reference to the parent `self` being initialized.
Self,
};
MarkUninitializedBehaviorInst(SILDebugLocation DebugLoc,
SILValue InitStorage,
SubstitutionMap InitStorageSubs,
SILValue Storage,
SILValue Setter,
SubstitutionMap SetterSubs,
SILValue Self,
SILType Ty);
static MarkUninitializedBehaviorInst *create(SILModule &M,
SILDebugLocation DebugLoc,
SILValue InitStorage,
SubstitutionMap InitStorageSubs,
SILValue Storage,
SILValue Setter,
SubstitutionMap SetterSubs,
SILValue Self,
SILType Ty);
public:
SILValue getInitStorageFunc() const {
return Operands[InitStorageFunc].get();
}
SubstitutionMap getInitStorageSubstitutions() const {
return InitStorageSubstitutions;
}
SILValue getStorage() const {
return Operands[Storage].get();
}
SILValue getSetterFunc() const {
return Operands[SetterFunc].get();
}
SubstitutionMap getSetterSubstitutions() const {
return SetterSubstitutions;
}
SILValue getSelf() const {
return Operands[Self].get();
}
ArrayRef<Operand> getAllOperands() const { return Operands.asArray(); }
MutableArrayRef<Operand> getAllOperands() { return Operands.asArray(); }
};
/// MarkFunctionEscape - Represents the escape point of set of variables due to
/// a function definition which uses the variables. This is only valid in Raw
/// SIL.