Commit Graph

57 Commits

Author SHA1 Message Date
Paul Hudson
06f82a53b5 Replaced the majority of ' : ' with ': '. 2019-07-18 20:46:07 +01:00
Ben Cohen
e9d4687e31 De-underscore @frozen, apply it to structs (#24185)
* De-underscore @frozen for enums

* Add @frozen for structs, deprecate @_fixed_layout for them

* Switch usage from _fixed_layout to frozen
2019-05-30 17:55:37 -07:00
Ben Cohen
f86fc100a5 Ditch the underscore 2018-11-15 20:55:10 -08:00
Ben Cohen
7df1587c27 Restore LazyCollection, but deprecated 2018-11-15 20:54:13 -08:00
Ben Cohen
df2307e035 [stdlib][DNM] Collapse sequence and collection wrappers (#20221)
* Concretize dropFirst/Last/sufix/prefix from Sequence

Remove split customization point

Eliminate SubSequence from Sequence protocol

Collapse LazyCollection

Collapse LazyMapCollection

Eliminate _SequenceWrapper

Collapse LazyFilterCollection

Collapse LazyDrop/PrefixWhileCollection

Fix tests, ABI stability update

Collapse FlattenSequence

* Add entries to source/ABI compatible expected results.

* Update tests to avoid pre-10.14 objc runtime bug

* Expunge _preprocessingPass
2018-11-14 10:05:58 -08:00
Ben Cohen
dbc2e21522 Remove customization points from Sequence and Collection (#19995) 2018-10-31 18:58:00 -07:00
Ben Cohen
ae6f5dd604 [stdlib] Add consuming/owned annotations to Collection implementations (#19360)
* Add consuming/owned annotations to Collection implementations

* Update SILOptimizer tests

* Fix access_marker_verify test

* XFAIL reconstruct_type_from_mangled_name
2018-09-21 12:06:56 -07:00
Ben Cohen
a4230ab2ad [stdlib] Update stdlib to 4.0 and reorganize compatibility shims (#17580)
* Update stdlib to 4.0 and move all compatibility shims into a dedicated source file
2018-06-29 06:26:52 -07:00
Slava Pestov
2e5aef9c8d stdlib: Remove redundant @usableFromInline attributes 2018-04-06 00:02:30 -07:00
Slava Pestov
e1f50b2d36 SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline 2018-03-30 21:55:30 -07:00
Max Moiseev
661f56d1c3 [stdlib] Source compatibility fix for lazy filter-filter and map-map cases
In order to maintain source compatibility the type-folding behavior
should not be the default in Swift 3 and Swift 4 modes.
2018-02-27 11:26:46 -08:00
Max Moiseev
f7e2238e91 [stdlib] Fold multiple layers of LazyMapSequence/LazyMapCollection 2018-01-18 14:54:22 -08:00
Nate Cook
0782b482b3 [stdlib] Documentation improvements
- Revise Equatable and Hashable for synthesized requirements
- Complete Strideable and stride(from:...:by:) documentation
- Revise DoubleWidth type docs
- Add complexity notes for Set.index(of:) and .contains(_:)
- Fix typos in Set.formUnion docs
- Add missing axioms for SetAlgebra (SR-6319)
- Improve guidance for description and debugDescription
- Add note about the result of passing duplicate keys to
  Dictionary(uniqueKeysWithValues:)
- Fix typo in BinaryInteger docs
- Update Substring docs with better conversion example
- Improve docs for withMemoryRebound and isKnownUniquelyReferenced
- Add missing docs not propagated from protocols
2018-01-05 17:06:44 -06:00
Thomas Di Meco
ea49459b75 [stdlib] Updated underestimatedCount doc related to complexity
There were inconsistencies in the documentation about the complexity of the underestimatedCount property.
2018-01-02 18:48:29 +01:00
Ben Cohen
9361a6b66f [stdlib] Nest Iterator and Index types for various stdlib types (#13489)
* Nest various top-level Iterator and Index types, and flatten extensions.

* Fix tests from nesting iterator

* Nest Unsafe*BufferPointer.Iterator, extensionify UnsafeBufferPointer

* Degyb LazyCollection

* Nest Flatten iterator and index
2017-12-18 15:27:35 -08:00
Max Moiseev
9e73d092ea Fix tests
(cherry picked from commit a1b1778c53)
2017-12-11 10:46:35 -08:00
Max Moiseev
1f78f3927b [stdlib] Conditional conformances for LazyMapCollection
(cherry picked from commit b927254564)
2017-12-11 10:46:30 -08:00
Graydon Hoare
62a6b74ad1 Revert "[stdlib] Conditional conformances for Lazy[Filter|Map]Collection" 2017-12-10 12:48:36 -08:00
Max Moiseev
a1b1778c53 Fix tests 2017-12-08 12:53:24 -08:00
Max Moiseev
b927254564 [stdlib] Conditional conformances for LazyMapCollection 2017-12-08 12:52:12 -08:00
Dmitri Gribenko
116759b0a8 New indexing model: gyb three variants of LazyMapCollection 2016-03-09 20:39:02 -08:00
Shawn Erickson
371c0f6e68 fixed things flagged in code review 2016-03-07 11:07:22 -08:00
Shawn Erickson
175c3cd136 dealt with issues and suggestions outlined in PR1559 2016-03-06 22:13:18 -08:00
Shawn Erickson
0db3a29987 fleshing out Collection.next(Index)
-removed fatal stub Collection.next(Index)
-added default Collection.next(Index) where Index is Strideable
-added custom next(Index) on some collections
-added fatal stub next(Index) on some collections
2016-03-06 17:37:40 -08:00
Dmitri Gribenko
ad1428e1d6 New collection indexing model: removed old index protocols
... and started to fix compiler errors.
2016-03-06 01:53:34 -08:00
Dmitri Gribenko
f0633ce5a9 stdlib: Sequence.iterator() => .makeIterator() 2016-02-23 13:52:30 -08:00
Dmitri Gribenko
f27315b6f8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-20 15:36:04 -08:00
Nicholas Maccharoli
09e884bac9 Change _transform from variable to constant
Since `_transform` never changes after being given an initial value in `init` it might be best  to make it a constant.
2016-02-21 02:20:27 +09:00
Max Moiseev
78ba5d5f3f [stdlib] Requires in comments changed to Precondition 2016-02-19 18:57:26 -08:00
Dmitri Gribenko
dd75aed67a Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-17 14:40:05 -08:00
Nate Cook
51251dc133 Convert imperative function summaries to present.
i.e., "Return ..." -> "Returns ..."
2016-02-12 04:20:39 -06:00
Nate Cook
f3c4e0ac74 Remove style on *generator* and friends. 2016-02-12 04:20:01 -06:00
Max Moiseev
55fde4c923 making tests pass 2016-02-10 16:08:40 -08:00
Max Moiseev
61c837209b Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-04 16:13:39 -08:00
practicalswift
ca9e488f30 [gardening] Add "-*- swift -*-" to *.swift.gyb. Remove from *.swift. 2016-01-23 10:27:03 +01:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Dmitri Gribenko
74ce1ca79c Add unavailable declarations for Swift 2.2 -> 3 migration 2016-01-19 14:32:59 -08:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
practicalswift
50baf2e53b Use consistent formatting in top of file headers. 2016-01-04 02:17:48 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
ken0nek
e7e70cea92 Add spaces before and after closure arrow in stdlib 2015-12-23 04:52:15 +09:00
Max Moiseev
5ccc258f71 func underestimatedLength() => var underestimatedLength { get } 2015-12-18 16:22:24 -08:00
Max Moiseev
b3fcc5fefa underestimateLength() => underestimatedLength() 2015-12-18 16:22:24 -08:00
Maxim Moiseev
9e50505970 internal or public // @testable initializers 2015-12-17 17:02:49 -08:00
Dmitri Gribenko
73ce9ae7e9 Collection.count => .length
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Maxim Moiseev
6b7fc91beb LazySequenceType => LazySequenceProtocol 2015-12-10 17:00:08 -08:00
Maxim Moiseev
844b81c46b SequenceType => Sequence 2015-12-09 17:16:56 -08:00
Maxim Moiseev
c678a839dc IndexType => Index 2015-12-09 17:16:42 -08:00
Maxim Moiseev
01e1a7bd52 LazyCollectionType => LazyCollectionProtocol 2015-12-09 17:16:22 -08:00
Maxim Moiseev
7e2466c14e CollectionType => Collection 2015-12-09 17:12:48 -08:00