Commit Graph

10 Commits

Author SHA1 Message Date
Josh Soref
644c18ca9b Spelling stdlib (#42444)
* spelling: against

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: algorithmic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: alignment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: anything

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architectural

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: architecture

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: are

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: artificial

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aside

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: available

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: being

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bidirectional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: characters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: circular

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compatibility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: compiled

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: correctly

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: covers

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: declaration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dependencies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: descriptor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dictionaries

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: greater

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: immortal

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initialize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: initializes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: iterable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: minimum

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: originally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: simplified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: sophisticated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trivia

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: wasn't

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:02:43 -07:00
Guillaume Lessard
f16eda4db3 [stdlib] add a missing deprecation 2021-11-02 18:43:42 -06:00
Karoy Lorentey
0836707303 [stdlib] Deprecate MutableCollection._withUnsafeMutableBufferPointerIfSupported (#36003)
* [stdlib] Deprecate MutableCollection._withUnsafeMutableBufferPointerIfSupported

In Swift 5.0, [SE-0237] introduced the public `MutableCollection.withContiguousMutableStorageIfAvailable` method. It’s time we migrated off the old, underscored variant and deprecated it.

The default `MutableCollection.sort` and `.partition(by:)` implementations are currently calling this hidden method rather than the documented interface, preventing custom Collection implementations from achieving good performance, even if they have contiguous storage.

[SE-0237]: https://github.com/apple/swift-evolution/blob/master/proposals/0237-contiguous-collection.md

* [test] Update tests for stdlib behavior changes

* Update stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift

Co-authored-by: Nate Cook <natecook@apple.com>

* Update stdlib/private/StdlibCollectionUnittest/CheckMutableCollectionType.swift

Co-authored-by: Nate Cook <natecook@apple.com>

* Apply suggestions from code review

Co-authored-by: Nate Cook <natecook@apple.com>

* [test] LoggingMutableCollection: Fix logging targets

* [stdlib] Fix warning by restoring original workaround

Co-authored-by: Nate Cook <natecook@apple.com>
2021-02-26 11:32:27 -08:00
Slava Pestov
7cc4be421f Fix invalid method overrides in StdlibCollectionUnittest 2019-07-02 15:43:02 -04:00
Ben Cohen
11769d2494 Add tests for withContiguousStorageIfAvailable 2018-12-07 17:30:13 -08:00
Ben Cohen
ad50a39b12 [stdlib] Add withContiguous{Mutable}StorageIfAvailable (#21092)
* Add MutableCollection.withContiguousMutableStorageIfAvailable

* Add withContiguousMutableStorageIfAvailable impls

* Add tests on concrete types

* Add Sequence.withContiguousStorageIfAvailable

* Implement withContiguousStorageIfAvailable in concrete types
2018-12-07 10:01:18 -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
34610780fd Break out conformances into extensions (#18098)
Replace LoggingRangeReplaceableCollection variants with typealiases

Replace LoggingMutableCollection variants with typealiases.

Collapse BufferAccessLoggingMutableCollection variants into typealiases

Turn LoggingRandomAccessCollection into a typealias

Turn LoggingBidirectionalCollection into a typealias
2018-07-20 12:50:12 -07:00
Michael Ilseman
c4614a9208 [test] De-gyb stdlib unittest.
StdlibUnittest uses gyb to avoid duplicating many source-context
arguments. However, this means that any test that wishes to add new
expect helpers has to also be gybbed. Given that this structure hasn't
changed in years, and we should have a real language support
eventually, de-gyb it.
2018-04-19 13:06:14 -07:00