File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1541,11 +1541,13 @@ extension Dictionary.Keys {
1541
1541
internal var _base : Dictionary < Key , Value > . Iterator
1542
1542
1543
1543
@inlinable
1544
+ @inline ( __always)
1544
1545
internal init ( _ base: Dictionary < Key , Value > . Iterator ) {
1545
1546
self . _base = base
1546
1547
}
1547
1548
1548
1549
@inlinable
1550
+ @inline ( __always)
1549
1551
public mutating func next( ) -> Key ? {
1550
1552
#if _runtime(_ObjC)
1551
1553
if case . cocoa( let cocoa) = _base. _variant {
@@ -1559,6 +1561,7 @@ extension Dictionary.Keys {
1559
1561
}
1560
1562
1561
1563
@inlinable
1564
+ @inline ( __always)
1562
1565
public func makeIterator( ) -> Iterator {
1563
1566
return Iterator ( _variant. makeIterator ( ) )
1564
1567
}
@@ -1571,11 +1574,13 @@ extension Dictionary.Values {
1571
1574
internal var _base : Dictionary < Key , Value > . Iterator
1572
1575
1573
1576
@inlinable
1577
+ @inline ( __always)
1574
1578
internal init ( _ base: Dictionary < Key , Value > . Iterator ) {
1575
1579
self . _base = base
1576
1580
}
1577
1581
1578
1582
@inlinable
1583
+ @inline ( __always)
1579
1584
public mutating func next( ) -> Value ? {
1580
1585
#if _runtime(_ObjC)
1581
1586
if case . cocoa( let cocoa) = _base. _variant {
@@ -1589,6 +1594,7 @@ extension Dictionary.Values {
1589
1594
}
1590
1595
1591
1596
@inlinable
1597
+ @inline ( __always)
1592
1598
public func makeIterator( ) -> Iterator {
1593
1599
return Iterator ( _variant. makeIterator ( ) )
1594
1600
}
Original file line number Diff line number Diff line change @@ -233,6 +233,7 @@ extension _HashTable: Sequence {
233
233
var word : Word
234
234
235
235
@inlinable
236
+ @inline ( __always)
236
237
init ( _ hashTable: _HashTable ) {
237
238
self . hashTable = hashTable
238
239
self . wordIndex = 0
@@ -260,6 +261,7 @@ extension _HashTable: Sequence {
260
261
}
261
262
262
263
@inlinable
264
+ @inline ( __always)
263
265
internal func makeIterator( ) -> Iterator {
264
266
return Iterator ( self )
265
267
}
Original file line number Diff line number Diff line change @@ -656,6 +656,7 @@ extension _NativeDictionary: Sequence {
656
656
internal var iterator : _HashTable . Iterator
657
657
658
658
@inlinable
659
+ @inline ( __always)
659
660
init ( _ base: __owned _NativeDictionary) {
660
661
self . base = base
661
662
self . iterator = base. hashTable. makeIterator ( )
@@ -673,18 +674,21 @@ extension _NativeDictionary.Iterator: IteratorProtocol {
673
674
internal typealias Element = ( key: Key , value: Value )
674
675
675
676
@inlinable
677
+ @inline ( __always)
676
678
internal mutating func nextKey( ) -> Key ? {
677
679
guard let index = iterator. next ( ) else { return nil }
678
680
return base. uncheckedKey ( at: index)
679
681
}
680
682
681
683
@inlinable
684
+ @inline ( __always)
682
685
internal mutating func nextValue( ) -> Value ? {
683
686
guard let index = iterator. next ( ) else { return nil }
684
687
return base. uncheckedValue ( at: index)
685
688
}
686
689
687
690
@inlinable
691
+ @inline ( __always)
688
692
internal mutating func next( ) -> Element ? {
689
693
guard let index = iterator. next ( ) else { return nil }
690
694
let key = base. uncheckedKey ( at: index)
Original file line number Diff line number Diff line change @@ -494,20 +494,23 @@ extension _NativeSet: Sequence {
494
494
internal var iterator : _HashTable . Iterator
495
495
496
496
@inlinable
497
+ @inline ( __always)
497
498
init ( _ base: __owned _NativeSet) {
498
499
self . base = base
499
500
self . iterator = base. hashTable. makeIterator ( )
500
501
}
501
502
}
502
503
503
504
@inlinable
505
+ @inline ( __always)
504
506
internal __consuming func makeIterator( ) -> Iterator {
505
507
return Iterator ( self )
506
508
}
507
509
}
508
510
509
511
extension _NativeSet . Iterator : IteratorProtocol {
510
512
@inlinable
513
+ @inline ( __always)
511
514
internal mutating func next( ) -> Element ? {
512
515
guard let index = iterator. next ( ) else { return nil }
513
516
return base. uncheckedElement ( at: index)
You can’t perform that action at this time.
0 commit comments