@@ -115,10 +115,6 @@ internal final class _IteratorBox<
115
115
internal var _base : Base
116
116
}
117
117
118
- internal func _typeID( _ instance: AnyObject ) -> ObjectIdentifier {
119
- return ObjectIdentifier ( instance. dynamicType)
120
- }
121
-
122
118
//===--- Sequence ---------------------------------------------------------===//
123
119
//===----------------------------------------------------------------------===//
124
120
@@ -646,17 +642,17 @@ internal protocol _AnyIndexBox : class {
646
642
647
643
func _unbox< T : Comparable > ( ) -> T ?
648
644
649
- func _equal ( to rhs: _AnyIndexBox ) -> Bool
645
+ func _isEqual ( to rhs: _AnyIndexBox ) -> Bool
650
646
651
- func _notEqual ( to rhs: _AnyIndexBox ) -> Bool
647
+ func _isNotEqual ( to rhs: _AnyIndexBox ) -> Bool
652
648
653
- func _less ( than rhs: _AnyIndexBox ) -> Bool
649
+ func _isLess ( than rhs: _AnyIndexBox ) -> Bool
654
650
655
- func _lessOrEqual ( to rhs: _AnyIndexBox ) -> Bool
651
+ func _isLessOrEqual ( to rhs: _AnyIndexBox ) -> Bool
656
652
657
- func _greater ( than rhs: _AnyIndexBox ) -> Bool
653
+ func _isGreater ( than rhs: _AnyIndexBox ) -> Bool
658
654
659
- func _greaterOrEqual ( to rhs: _AnyIndexBox ) -> Bool
655
+ func _isGreaterOrEqual ( to rhs: _AnyIndexBox ) -> Bool
660
656
}
661
657
662
658
internal final class _IndexBox <
@@ -673,34 +669,34 @@ internal final class _IndexBox<
673
669
}
674
670
675
671
internal var _typeID : ObjectIdentifier {
676
- return Swift . _typeID ( self )
672
+ return ObjectIdentifier ( self . dynamicType )
677
673
}
678
674
679
675
internal func _unbox< T : Comparable > ( ) -> T ? {
680
676
return ( self as _AnyIndexBox as? _IndexBox < T > ) ? . _base
681
677
}
682
678
683
- internal func _equal ( to rhs: _AnyIndexBox ) -> Bool {
679
+ internal func _isEqual ( to rhs: _AnyIndexBox ) -> Bool {
684
680
return _base == _unsafeUnbox ( rhs)
685
681
}
686
682
687
- internal func _notEqual ( to rhs: _AnyIndexBox ) -> Bool {
683
+ internal func _isNotEqual ( to rhs: _AnyIndexBox ) -> Bool {
688
684
return _base != _unsafeUnbox ( rhs)
689
685
}
690
686
691
- internal func _less ( than rhs: _AnyIndexBox ) -> Bool {
687
+ internal func _isLess ( than rhs: _AnyIndexBox ) -> Bool {
692
688
return _base < _unsafeUnbox ( rhs)
693
689
}
694
690
695
- internal func _lessOrEqual ( to rhs: _AnyIndexBox ) -> Bool {
691
+ internal func _isLessOrEqual ( to rhs: _AnyIndexBox ) -> Bool {
696
692
return _base <= _unsafeUnbox ( rhs)
697
693
}
698
694
699
- internal func _greater ( than rhs: _AnyIndexBox ) -> Bool {
695
+ internal func _isGreater ( than rhs: _AnyIndexBox ) -> Bool {
700
696
return _base > _unsafeUnbox ( rhs)
701
697
}
702
698
703
- internal func _greaterOrEqual ( to rhs: _AnyIndexBox ) -> Bool {
699
+ internal func _isGreaterOrEqual ( to rhs: _AnyIndexBox ) -> Bool {
704
700
return _base >= _unsafeUnbox ( rhs)
705
701
}
706
702
}
@@ -732,32 +728,32 @@ public struct AnyIndex : Comparable {
732
728
/// identical.
733
729
public func == ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
734
730
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
735
- return lhs. _box. _equal ( to: rhs. _box)
731
+ return lhs. _box. _isEqual ( to: rhs. _box)
736
732
}
737
733
738
734
public func != ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
739
735
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
740
- return lhs. _box. _notEqual ( to: rhs. _box)
736
+ return lhs. _box. _isNotEqual ( to: rhs. _box)
741
737
}
742
738
743
739
public func < ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
744
740
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
745
- return lhs. _box. _less ( than: rhs. _box)
741
+ return lhs. _box. _isLess ( than: rhs. _box)
746
742
}
747
743
748
744
public func <= ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
749
745
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
750
- return lhs. _box. _lessOrEqual ( to: rhs. _box)
746
+ return lhs. _box. _isLessOrEqual ( to: rhs. _box)
751
747
}
752
748
753
749
public func > ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
754
750
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
755
- return lhs. _box. _greater ( than: rhs. _box)
751
+ return lhs. _box. _isGreater ( than: rhs. _box)
756
752
}
757
753
758
754
public func >= ( lhs: AnyIndex , rhs: AnyIndex ) -> Bool {
759
755
_precondition ( lhs. _typeID == rhs. _typeID, " base index types differ " )
760
- return lhs. _box. _greaterOrEqual ( to: rhs. _box)
756
+ return lhs. _box. _isGreaterOrEqual ( to: rhs. _box)
761
757
}
762
758
763
759
//===--- Collections ------------------------------------------------------===//
0 commit comments