@@ -1415,9 +1415,7 @@ final public class AllocExistentialBoxInst : SingleValueInstruction, Allocation
14151415/// An instruction whose side effects extend across a scope including other instructions. These are always paired with a
14161416/// scope ending instruction such as `begin_access` (ending with `end_access`) and `begin_borrow` (ending with
14171417/// `end_borrow`).
1418- public protocol ScopedInstruction {
1419- var instruction : Instruction { get }
1420-
1418+ public protocol ScopedInstruction : Instruction {
14211419 var endOperands : LazyFilterSequence < UseList > { get }
14221420
14231421 var endInstructions : EndInstructions { get }
@@ -1437,17 +1435,13 @@ extension Instruction {
14371435public protocol BorrowIntroducingInstruction : SingleValueInstruction , ScopedInstruction {
14381436}
14391437
1440- extension BorrowIntroducingInstruction {
1441- public var instruction : Instruction { get { self } }
1442- }
1443-
14441438final public class EndBorrowInst : Instruction , UnaryInstruction {
14451439 public var borrow : Value { operand. value }
14461440}
14471441
14481442extension BorrowIntroducingInstruction {
14491443 public var endOperands : LazyFilterSequence < UseList > {
1450- return uses. lazy. filter { $0. instruction is EndBorrowInst }
1444+ return self . uses. lazy. filter { $0. instruction is EndBorrowInst }
14511445 }
14521446}
14531447
@@ -1518,8 +1512,6 @@ final public class EndAccessInst : Instruction, UnaryInstruction {
15181512}
15191513
15201514extension BeginAccessInst : ScopedInstruction {
1521- public var instruction : Instruction { get { self } }
1522-
15231515 public var endOperands : LazyFilterSequence < UseList > {
15241516 return uses. lazy. filter { $0. instruction is EndAccessInst }
15251517 }
@@ -1556,8 +1548,6 @@ final public class AbortApplyInst : Instruction, UnaryInstruction {
15561548}
15571549
15581550extension BeginApplyInst : ScopedInstruction {
1559- public var instruction : Instruction { get { self } }
1560-
15611551 public var endOperands : LazyFilterSequence < UseList > {
15621552 return token. uses. lazy. filter { $0. isScopeEndingUse }
15631553 }
0 commit comments