Commit Graph

95 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
8b189d99e4 Turn off SWIFT_ENABLE_REFLECTION on the stdlib_minimal preset (#39030) 2021-09-12 18:54:53 -07:00
Erik Eckstein
79fb67f5df tests: exclude some very long running tests from jobs with a non-optimized stdlib
Those are tests which take > 1000s on some simulator configurations with a non-optimized stdlib.
We run those tests anyway with an optimized stdlib. So we don’t lose test coverage by disabling them for debug-stdlib.

This fixes some sporadic time outs on the CI jobs.
2020-01-17 16:51:02 +01:00
Arnold Schwaighofer
b31b7a9d8e Remove some UNSUPPORTED swift_test_mode_optimize_none_with_implicit_dynamic
rdar://51228899
2019-05-31 08:45:37 -07:00
Arnold Schwaighofer
e113ef8c93 Add a mode to test implicit dynamic with private imports 2019-03-20 14:34:01 -07:00
Doug Gregor
cfc0f892e3 [Mangle] Include generic arguments of extensions for the Objective-C runtime
The remangler for the Objective-C runtime was dropping generic arguments
of extension contents, leading to collisions with @objc class names.
Include the generic arguments of extensions.

Fixes rdar://problem/45956357.
2018-11-26 13:51:40 -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
e338344bae Remove overloads that were needed pre-conditional conformance 2018-09-11 21:00:36 -07:00
Ben Cohen
83823f5f7f [stdlib] Obsolete various compatibility shims in 5.0 (#19008)
* Obsolete ModifierSlice typealiases in 5.0

* Obsolete *Indexable in 5.0

* Obsolete IteratorOverOne/EmptyIterator in 5.0

* Obsolete lazy typealiases in 5.0

* Drop .characters from tests

* Obsolete old literal protocols in 5.0

* Obsolete Range conversion helpers in 5.0

* Obsolete IndexDistance helpers in 5.0

* Obsolete Unsafe compat helpers in 5.0

* Obsolete flatMap compatibility helper in 5.0

* Obsolete withMutableCharacters in 5.0

* Obsolete customPlaygroundQuickLook in 5.0

* Deprecate Zip2Sequence streams in 5.0

* Replace * with swift on lotsa stuff

* Back off obsoleting playground conformances for now
2018-08-28 13:20:25 -07:00
Doug Gregor
059163360a Re-enable Lazy test on Linux.
Arnold fixed this by re-computing the insert position in
getSpecializedConformance(), with
https://github.com/apple/swift/pull/17904.

Fixes rdar://problem/35797159.
2018-07-26 16:07:37 -07:00
Ben Cohen
2eec236f13 Move two more Iterators into nested types 2018-06-21 16:28:20 -07:00
Andrew Trick
bf0463cdc1 Disable Lazy.swift on Ubuntu 16.04.
Even without ASAN this failes with "corrupted double-linked list".

<rdar://problem/35797159> [Associated Type Inference] Swift CI: 1. OSS - Swift ASAN - Ubuntu 16.04 (master) heap-use-after-free ASTContext::getSpecializedConformance llvm::FoldingSetBase::InsertNode
2018-03-13 08:59:51 -07:00
Andrew Trick
725da7f303 Disable Lazy.swift under Linux ASAN.
Waiting for a fix for <rdar://35797159> [Associated Type Inference]
Swift CI: 1. OSS - Swift ASAN - Ubuntu 16.04 (master)
heap-use-after-free ASTContext::getSpecializedConformance
llvm::FoldingSetBase::InsertNode
2018-03-12 15:29:31 -07:00
Ben Cohen
2380950fa7 [stdlib] Collapse DropWhileBidirectionalCollection and de-gyb DropWhile.swift (#14906)
Collapse DropWhileBidirectionalCollection and de-gyb DropWhile.swift
2018-03-02 07:53:06 -08:00
Ben Cohen
f50afde523 Collapse PrefixWhileBidirectionalCollection and de-gyb PrefixWhile.swift (#14910) 2018-03-01 14:13:48 -08:00
Doug Gregor
fc253e8a23 [Stdlib] Fix requirements on FlattenCollectionIndex.
FlattenCollectionIndex recently became a typealias, but overstated its
requirements.
2017-12-21 10:07:11 -08: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
c27b366f46 [stdlib] Utilize conditional conformances for FlattenCollection (#13476)
* [stdlib] Utilize conditional conformances for FlattenCollection

* Fix indentation [NFC]
2017-12-16 10:57:02 -08:00
Max Moiseev
1c75bd2433 Conditional conformances for LazyCollection
(cherry picked from commit 6e7b36a66c)
2017-12-11 10:46:40 -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
Max Moiseev
ea02806f28 [stdlib] Conditional conformances for LazyFilterCollection
(cherry picked from commit 833721a172)
2017-12-11 10:46:25 -08:00
Graydon Hoare
62a6b74ad1 Revert "[stdlib] Conditional conformances for Lazy[Filter|Map]Collection" 2017-12-10 12:48:36 -08:00
Max Moiseev
6e7b36a66c Conditional conformances for LazyCollection 2017-12-08 12:53:24 -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
Max Moiseev
833721a172 [stdlib] Conditional conformances for LazyFilterCollection 2017-12-08 12:52:12 -08:00
Ben Cohen
4ddac3fbbd [stdlib] Eradicate IndexDistance associated type (#12641)
* Eradicate IndexDistance associated type, replacing with Int everywhere

* Consistently use Int for ExistentialCollection’s IndexDistance type.

* Fix test for IndexDistance removal

* Remove a handful of no-longer-needed explicit types

* Add compatibility shims for non-Int index distances

* Test compatibility shim

* Move IndexDistance typealias into the Collection protocol
2017-12-08 12:00:23 -08:00
Ben Cohen
c4f0b5fe94 [stdlib] Adopt conditional conformance for Indices, Slice, ReversedCollection (#12913)
* Refactor Indices and Slice to use conditional conformance

* Replace ReversedRandomAccessCollection with a conditional extension

* Refactor some types into struct+extensions

* Revise Slice documentation

* Fix test cases for adoption of conditional conformances.

* [RangeReplaceableCollection] Eliminate unnecessary slicing subscript operator.

* Add -enable-experimental-conditional-conformances to test.

* Gruesome workaround for crasher in MutableSlice tests
2017-11-30 09:10:22 -08:00
taylor swift
c85880899d implement SE 184: add allocation methods to Unsafe buffer pointers, drop all parameters from deallocation, adjust namings, and add repeated-value assignment methods 2017-11-17 21:28:03 -08:00
Doug Gregor
fb253b182a Use a more efficient SubSequence type for lazy map and filter.
Rather than using the default slice type when slicing the collection produced
by a lazy map or filter, slice the base collection and form a new
lazy map/filter collection from it. This allows any optimizations provided by
the collection SubSequence type to kick in, as well as ensuring that slicing
a lazy collection provides the same type as producing a lazy collection of a
slice.

This is technically source-breaking, because someone could have spelled out
the types of slicing a lazy filter or map… but it seems unlikely to matter
in practice and the benefits could be significant.

Fixes ABI FIXME’s #28 and #46.
2017-10-01 15:08:23 -07:00
Arnold Schwaighofer
1214f04757 Fix Lazy.swift.gyb in optimize test mode
EmptyCollection was changed a while ago to use _debugPrecondition checks in the
accesses being tested that fail in optimize mode. Change the test to only expect
a failure in debug mode.

rdar://31897334
2017-06-30 08:48:20 -07:00
Jordan Rose
7295423339 Revert "Re-enable Lazy validation test." (#10330)
The test is still failing on some of the Apple-internal builders. Tracked (still) by rdar://problem/31897334.
2017-06-16 13:46:49 -07:00
Mark Lacey
af49a77b28 Re-enable Lazy validation test.
Works for me locally.

Resolves rdar://problem/31897334.
2017-06-16 08:38:29 -07:00
Ben Cohen
169f3aed6f Revert "Un-XFAIL Lazy.swift test (#9777)"
This reverts commit f9893a9758.
2017-05-19 11:30:33 -07:00
Ben Cohen
f9893a9758 Un-XFAIL Lazy.swift test (#9777) 2017-05-19 10:03:54 -07:00
Arnold Schwaighofer
6c854c2532 [stdlib] Disable failing Lazy.swift.gyb test again
rdar://31897334
2017-04-30 15:33:42 -07:00
Doug Gregor
781082b237 Re-enabled Lazy test.
This was fixed by the recent fix for getConformanceAndConcreteType()'s
creation of substitution maps, PR #9053. Fixes rdar://problem/31780356.
2017-04-27 21:55:49 -07:00
Erik Eckstein
f74e677312 Disabled a test to unblock ci
rdar://problem/31780356
2017-04-24 08:54:59 -07:00
Doug Gregor
70ee642072 [Stdlib] Eliminate LazyFilterIndex.
Eliminate the vestigial type `LazyFilterIndex`, which was
necessary pre-Swift-3 to allow the index to move. Swift 3's indexing
model means that the movement of indices is on the collection itself,
so we no longer need `LazyFilterIndex`: instead, the `Index` type of
the lazy filtered collection is simply the `Index` type of the base
collection, which is a nice convenience: it means you can take indices
from a lazy wrapper around a given collection C and use them with the
collection C (and, with care, vice-versa) without jumping through
extra hoops.
2017-04-20 16:15:41 -07:00
Andrew Trick
30f2cce1b6 Do not run recursive O(n^2) collection slice testing on large collections.
Now, even with collection unit testing wired up, the validation tests
take the same amount of time to execute.
2017-04-06 17:12:18 -07:00
Andrew Trick
849421799a Revert "SE-0138: Proposed amendment to SE-0138: Normalize UnsafeRawBufferPointer Slices (#8222)"
This reverts commit 1d32586d28.
2017-04-06 10:38:52 -07:00
Andrew Trick
1d32586d28 SE-0138: Proposed amendment to SE-0138: Normalize UnsafeRawBufferPointer Slices (#8222)
* Add sliceability tests for Unsafe(Raw)BufferPointer.

Improve the generic sliceability tests to verify that SubSequence indices are
compatible with their parents indices.

* Fix and enable testing stdlib Collection instances.

Top-level entry points fully testing a collection instance:
check${Traversal}Collection

One level of recursion into all slices of the collection instance
O(n^2). (Not combinatorial).

Previously, checkCollection() did nothing. So much of the testing infrastructure was inactive. Now it runs all forward collection tests.

Fixes a bug in subscriptRangeTests.

The UnsafeRawBufferPointer and Data collection testing is disabled and
will be fixed in the following commit.

* Give UnsafeRawBufferPointer a distinct slice type.

SubSequence = RandomAccessSlice<Self>

* Fix raw buffer pointer tests after changing the API

* Add UnsafeRawBuffer(rebasing:) initializers.

Allows converting a raw slice into a zero-based raw buffer,
which is a common operation on flat memory.

Add and update UnsafeRawBufferPointer unit tests.

* Do not run recursive O(n^2) collection slice testing on large collections.

Now, even with collection unit testing wired up, the validation tests
take the same amount of time to execute.

* Add init(rebasing:) to UnsafeBufferPointer.

This is required for consistency with UnsafeRawBufferPointer.

* Update CHANGELOG.md for SE-0138 amendment: UnsafeRawBufferPointer slice type.
2017-04-06 10:08:09 -07:00
Erik Eckstein
2be1062cf2 Revert "Disable two stdlib tests in optimization mode."
The problem is fixed, so these tests should pass in optimized mode again.

This reverts commit bdd8626374.
2017-02-20 12:49:18 -08:00
Erik Eckstein
bdd8626374 Disable two stdlib tests in optimization mode.
Until rdar://problem/30579713 is fixed.
2017-02-17 14:28:57 -08:00
Ben Cohen
578a52627a Merge branch 'master' into se-147 2017-01-07 13:19:15 -08:00
Ben Cohen
3bdada1773 Merge pull request #6506 from airspeedswift/im-not-warning-you-again
[stdlib] Squash various warnings
2017-01-06 16:51:06 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Ben Cohen
fefc2e40df Migrate _copyContents to be called from UnsafeMutableBufferPointer with checks for overrun. 2017-01-05 11:59:49 -08:00
ben-cohen
ce0d713cd6 fixed where clauses, Optional-as-Any and unused vars 2016-12-29 07:58:12 -08:00