[SIL] InitAccessors: Reference "self" in assign_or_init instruction

First step on the path to remove dependence on "setter".
This commit is contained in:
Pavel Yaskevich
2023-06-26 16:03:29 -07:00
parent 50d2f4d3ed
commit 3063e9d778
11 changed files with 76 additions and 74 deletions

View File

@@ -1256,11 +1256,12 @@ AssignByWrapperInst::AssignByWrapperInst(SILDebugLocation Loc,
sharedUInt8().AssignByWrapperInst.mode = uint8_t(mode);
}
AssignOrInitInst::AssignOrInitInst(SILDebugLocation Loc, SILValue Src,
SILValue Initializer, SILValue Setter,
AssignOrInitInst::Mode Mode)
: InstructionBase<SILInstructionKind::AssignOrInitInst, NonValueInstruction>(Loc),
Operands(this, Src, Initializer, Setter) {
AssignOrInitInst::AssignOrInitInst(SILDebugLocation Loc, SILValue Self,
SILValue Src, SILValue Initializer,
SILValue Setter, AssignOrInitInst::Mode Mode)
: InstructionBase<SILInstructionKind::AssignOrInitInst,
NonValueInstruction>(Loc),
Operands(this, Self, Src, Initializer, Setter) {
assert(Initializer->getType().is<SILFunctionType>());
sharedUInt8().AssignOrInitInst.mode = uint8_t(Mode);
Assignments.resize(getNumInitializedProperties());