@@ -1415,9 +1415,7 @@ final public class AllocExistentialBoxInst : SingleValueInstruction, Allocation
1415
1415
/// An instruction whose side effects extend across a scope including other instructions. These are always paired with a
1416
1416
/// scope ending instruction such as `begin_access` (ending with `end_access`) and `begin_borrow` (ending with
1417
1417
/// `end_borrow`).
1418
- public protocol ScopedInstruction {
1419
- var instruction : Instruction { get }
1420
-
1418
+ public protocol ScopedInstruction : Instruction {
1421
1419
var endOperands : LazyFilterSequence < UseList > { get }
1422
1420
1423
1421
var endInstructions : EndInstructions { get }
@@ -1437,17 +1435,13 @@ extension Instruction {
1437
1435
public protocol BorrowIntroducingInstruction : SingleValueInstruction , ScopedInstruction {
1438
1436
}
1439
1437
1440
- extension BorrowIntroducingInstruction {
1441
- public var instruction : Instruction { get { self } }
1442
- }
1443
-
1444
1438
final public class EndBorrowInst : Instruction , UnaryInstruction {
1445
1439
public var borrow : Value { operand. value }
1446
1440
}
1447
1441
1448
1442
extension BorrowIntroducingInstruction {
1449
1443
public var endOperands : LazyFilterSequence < UseList > {
1450
- return uses. lazy. filter { $0. instruction is EndBorrowInst }
1444
+ return self . uses. lazy. filter { $0. instruction is EndBorrowInst }
1451
1445
}
1452
1446
}
1453
1447
@@ -1518,8 +1512,6 @@ final public class EndAccessInst : Instruction, UnaryInstruction {
1518
1512
}
1519
1513
1520
1514
extension BeginAccessInst : ScopedInstruction {
1521
- public var instruction : Instruction { get { self } }
1522
-
1523
1515
public var endOperands : LazyFilterSequence < UseList > {
1524
1516
return uses. lazy. filter { $0. instruction is EndAccessInst }
1525
1517
}
@@ -1556,8 +1548,6 @@ final public class AbortApplyInst : Instruction, UnaryInstruction {
1556
1548
}
1557
1549
1558
1550
extension BeginApplyInst : ScopedInstruction {
1559
- public var instruction : Instruction { get { self } }
1560
-
1561
1551
public var endOperands : LazyFilterSequence < UseList > {
1562
1552
return token. uses. lazy. filter { $0. isScopeEndingUse }
1563
1553
}
0 commit comments