[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

@@ -4842,7 +4842,7 @@ class AssignOrInitInst
friend SILBuilder;
USE_SHARED_UINT8;
FixedOperandList<3> Operands;
FixedOperandList<4> Operands;
/// Marks all of the properties in `initializes(...)` list that
/// have been initialized before this intruction to help Raw SIL
@@ -4862,14 +4862,14 @@ public:
};
private:
AssignOrInitInst(SILDebugLocation DebugLoc,
SILValue Src, SILValue Initializer,
SILValue Setter, Mode mode);
AssignOrInitInst(SILDebugLocation DebugLoc, SILValue Self, SILValue Src,
SILValue Initializer, SILValue Setter, Mode mode);
public:
SILValue getSrc() const { return Operands[0].get(); }
SILValue getInitializer() const { return Operands[1].get(); }
SILValue getSetter() { return Operands[2].get(); }
SILValue getSelf() const { return Operands[0].get(); }
SILValue getSrc() const { return Operands[1].get(); }
SILValue getInitializer() const { return Operands[2].get(); }
SILValue getSetter() { return Operands[3].get(); }
Mode getMode() const {
return Mode(sharedUInt8().AssignOrInitInst.mode);