Commit Graph

630 Commits

Author SHA1 Message Date
Ben Rimmington
2f326bcc88 [stdlib] Remove theGlobalMT19937
SwiftPrivate/PRNG.swift:

- currently uses `theGlobalMT19937`;
- previously used `arc4random` (see #1939);
- is obsoleted by SE-0202: Random Unification.
2018-08-01 13:00:16 +01:00
Ben Cohen
345879429b [stdlib] Take several underscored stdlib functions private (#18134)
* Make _sanityCheck internal

* Make _debugPrecondition internal

* Make Optional._unsafelyUnwrappedUnchecked internal.

* Make _precondition internal

* Switch Foundation _sanityChecks to assertions

* Update file check tests

* Remove one more _debugPrecondition

* Update Optimization-with-check tests
2018-07-24 18:26:19 -07:00
Ben Cohen
f62c2c9fa3 Sink down the internal word index enum, fiddle with some switches 2018-07-16 09:06:37 -07:00
Ben Cohen
1d80829f4d Synthesize DoubleWidth.Words.Index Equatable conformance 2018-07-16 09:06:37 -07:00
Ben Cohen
5fcf4dd3c7 Break out DoubleWidth.Words.Index conformances 2018-07-16 09:06:37 -07:00
Ben Cohen
38214cce31 Break out DoubleWidth.Words.Index declaration 2018-07-16 09:06:37 -07:00
Ben Cohen
4fa63880be Break out DoubleWidth.Words declaration from Collection conformance 2018-07-16 09:06:37 -07:00
Ben Cohen
8540f59d16 Break out DoubleWidth.Words from FixedWidthInteger extension 2018-07-16 09:06:37 -07:00
Ben Cohen
3ac0ef73aa Remove _frozen from _IndexValue 2018-07-16 09:06:37 -07:00
Ben Cohen
e848e559bf Break out Equatable and Comparable conformance 2018-07-16 09:06:37 -07:00
Ben Cohen
4cd964a7be Remove inlinability etc from DoubleWidth 2018-07-16 09:06:37 -07:00
Ben Cohen
b77b544cdc Remove remaining @ininable from @_transparent (#17968) 2018-07-16 08:12:52 -07:00
Ben Cohen
a6952decab [stdlib] Remove inlineable annotation from transparent functions (#17800)
* Remove inlineable annotation from transparent functions
2018-07-07 08:47:02 -07:00
Rintaro Ishizaki
622a140adb Merge pull request #17796 from rintaro/parse-drop3-tests
[Parse] Migrate tests to Swift4
2018-07-07 23:25:11 +09:00
Rintaro Ishizaki
5cbbadb750 [Parse] Migrate tests to Swift4 2018-07-07 01:29:43 +09:00
Mark Lacey
5e75b1ad3b Remove -swift-version 3 from a handful of tests and update them appropriately.
These are all tests that would otherwise fail if the expression type
checker support for Swift 3 is removed.

I've moved some of the code from deleted Migrator tests into new
Constraints tests that verify that we do not support the constructs.
2018-07-04 20:58:21 -07:00
Robert Widmann
e3118f1e2a Miscellaneous test migrations 2018-06-27 13:31:22 -07:00
Slava Pestov
5d2752f7d2 Run tests with -swift-version 4 by default
Some test now fail, so add an explicit -swift-version 3.
2018-06-19 23:24:19 -07:00
Dave Abrahams
9b7821d1e9 Add missing RUN line
Thanks to @bob-wilson for this fix
2018-06-14 22:47:09 -07:00
Dave Abrahams
0d04dfd53c Try using an output file name that works in other tests
Linux's ld is failing to find the file somehow.
2018-06-10 10:04:33 -07:00
Dave Abrahams
ae4ffd1ed4 Make algorithms prototype standalone-testable and work with 4.1
Also,

- strip out currently-unused flotsam
- begin making comments more descriptive
- fix indentation
2018-06-08 17:23:30 -07:00
Dave Abrahams
7e1a05fbee Algorithms prototype updates 2018-06-07 12:11:14 -07:00
Karoy Lorentey
0fb3e88110 [SE-0206][stdlib] De-underscore Hashable.hash(into:) 2018-04-24 17:42:42 +01:00
Karoy Lorentey
45cb8b7123 [SE-0206][stdlib] De-underscore Hasher 2018-04-24 17:42:42 +01:00
Nate Cook
58933d88c5 [stdlib] Rename index(...) methods to firstIndex(...)
A la SE-204.
2018-04-21 18:07:25 -05:00
Karoy Lorentey
ccdc218cbd [stdlib] _Hasher: append => combine 2018-04-18 14:18:44 +01:00
Slava Pestov
e1f50b2d36 SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline 2018-03-30 21:55:30 -07:00
Maxim Moiseev
8f635083bd Don't test DoubleWidth on 32 bit platforms 2018-03-25 22:40:58 -07:00
Max Moiseev
141fefc06b Update tests after removal of DoubleWidth 2018-03-23 17:14:46 -07:00
Max Moiseev
8ebb45f367 Move DoubleWidth to test/Prototypes 2018-03-23 15:42:18 -07:00
Saleem Abdulrasool
b67d5f0cf7 test: convert rm -rf && mkdir -p into %empty-directory
This converts the instances of the pattern for which we have a proper
substitution in lit.  This will make it easier to replace it
appropriately with Windows equivalents.
2018-03-06 14:30:54 -08:00
Nate Cook
3543625a41 [test] Update prototypes to use conditional conformance (#14274) 2018-02-01 18:30:00 +01:00
Ben Cohen
ca6c6b1d36 [stdlib] Cleanup DefaultIndices, delete dead code (#13952)
* Remove a bunch of Default(Bidirectional|RandomAccess)Indices usage from stdlib and test

* Remove some DefaultRandomAccessIndices and IndexDistance usage from Foundation

* Remove no-longer-used internal type in Existentials.swift

* Get rid of indicesForTraversal
2018-01-15 13:48:08 -08:00
swift-ci
adf83617ec Merge pull request #13526 from DougGregor/remove-conditional-conformances-flag 2017-12-19 11:17:44 -08:00
Doug Gregor
ffb0d55b35 Eliminate extraneous uses of -enable-experimental-conditional-conformances 2017-12-18 22:56:22 -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
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
85d190cd7d [stdlib] Replace various uses of BlahSlice with Slice to reduce warnings (#13263)
* Kill the slice variants from the gybbed collection test types

* Handful more SDK instances

* Fix SequencesCollections.swift.gyb
2017-12-05 19:09:56 -08:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -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
Kuba (Brecka) Mracek
3e87cf4bd1 Remove "%T" expansions (#11612) 2017-11-28 15:47:14 -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
Nate Cook
6d09c7a91f [stdlib] Remove *Subrange methods from algorithms prototype
Now that slices pin properly, the recursive parts of these algorithms
can operate on collection slices instead of the whole collection with
a `subrange` parameter. Adds tests to make sure we’re successfully
performing the operation without reallocations.

* Fix exclusive access warnings for Algorithms prototype
* Modernize generic constraints and range expressions
* Remove _Subrange methods in Algorithms prototype
* Add slice conformances to MutableCollectionAlgorithms
* Re-indent partitionPoint with 2 spaces
* Add documentation for internal algorithms
* Switch algorithms prototype to use Swift 4.0
2017-10-09 09:28:30 -05:00
Dave Abrahams
9d78fb6d37 Pattern matching prototype: expunge Element_ hack 2017-08-31 11:02:58 -07:00
Dave Abrahams
fcb2797d60 Strip obsolete workaround 2017-08-29 15:30:57 -07:00
Dave Abrahams
b14d586579 Strip obsolete constraints 2017-08-29 15:16:59 -07:00
Joe Shajrawi
66d0df6bae Revert "Temporary disable failing armv7 tests"
This reverts commit 78e5e25215.
2017-08-15 13:43:57 -07:00
Joe Shajrawi
78e5e25215 Temporary disable failing armv7 tests 2017-08-08 15:22:14 -07:00
Nate Cook
a7ce287a53 Merge branch 'master' into integers-revised 2017-07-28 12:23:48 -05:00
Max Moiseev
1c3e597928 [stdlib] Get rid of ArithmeticOverflow type 2017-07-26 11:09:36 -07:00