Commit Graph

3744 Commits

Author SHA1 Message Date
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
Xiaodi Wu
81311bebf8 Match memory layout of DoubleWidth to base integer types 2017-12-10 02:30:40 -06:00
Xiaodi Wu
30d5e344b1 Rename the combine hashes function and use a common implementation 2017-12-10 02:13:25 -06:00
Max Moiseev
e4f94a318f [stdlib] Improve default implementation of Collection.distance(from:to:)
(cherry picked from commit 72948cae9a)
2017-12-08 13:07:07 -08:00
Max Moiseev
229dcd6275 Enforce forward collection preconditions in LazyFilterCollection 2017-12-08 13:07:07 -08:00
Max Moiseev
1388064e37 Rearrange code in LazyFilterCollection and provide delegating overrides 2017-12-08 13:04:28 -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
Max Moiseev
3bace08f9a Revert "[stdlib] Improve default implementation of Collection.distance(from:to:)"
This reverts commit 72948cae9a.
2017-12-07 14:28:19 -08:00
Max Moiseev
72948cae9a [stdlib] Improve default implementation of Collection.distance(from:to:) 2017-12-06 18:19:34 -08:00
Dante-Broggi
f360cc861d update unavailability message 2017-12-06 17:43:43 -05:00
Dante-Broggi
996ff7fc50 formatting (indentation, etc.) 2017-12-06 16:46:17 -05:00
Dante-Broggi
18869209f1 fix [SR-6009]
and cause identical `#if`s to not be nested
2017-12-06 14:47:27 -05:00
Max Moiseev
80940efa6d Merge pull request #13191 from moiseev/ungybbed
[stdlib] Conditional gardening [NFC]
2017-12-06 09:47:46 -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
Max Moiseev
42eb45347b [stdlib] Conditional gardening 2017-12-05 16:33:48 -08:00
Max Moiseev
8dbaa2a752 Revert "[stdlib] Temporarily exclude DoubleWidth from the standard library" 2017-12-05 15:37:07 -08:00
Karoy Lorentey
9fef06e59c Merge pull request #12752 from hamishknight/dictionary-subscript-addressor
[stdlib] Use addressor for Dictionary's subscript(_:default:)
2017-12-04 15:04:29 +01:00
Ben Cohen
fde0d928eb Add conditional Lazy conformance to Slice when Base is Lazy (#13242) 2017-12-03 21:50:42 -08:00
Hamish
7876391f47 [stdlib] Call nativePointerToValue(at:) from nativePointerToValue(forKey:insertingDefault:) 2017-12-03 17:28:45 +00:00
Greg Parker
da14cd79a6 [runtime] Clean up symbol exports in libc functions. (#13202) 2017-12-01 17:49:11 -08:00
Greg Parker
415b36dddc [runtime] Clean up symbol exports in casting and class introspection. (#13005) 2017-12-01 17:48:48 -08:00
swift-ci
a5d9ace6bf Merge pull request #13200 from airspeedswift/extensionify 2017-12-01 17:40:58 -08:00
Max Moiseev
156e6eb848 Exclude DoubleWidth due to the binary size concerns
<rdar://problem/32726173>
2017-12-01 14:29:53 -08:00
Max Moiseev
67e5cd0ff3 Merge pull request #13196 from apple/moiseev-patch-1
Remove the GYB artifact [NFC]
2017-12-01 14:25:37 -08:00
ben-cohen
d67c5f0025 Part the fourth 2017-12-01 14:06:14 -08:00
Nate Cook
a800f0cc4f [NFC] Reindent and rewrap to stdlib conventions 2017-12-01 16:05:07 -06:00
Nate Cook
b73e8570f5 [NFC] Gybbify repeated code 2017-12-01 15:25:55 -06:00
Nate Cook
158b1a498d [NFC] Convert Codable.swift to .swift.gyb 2017-12-01 15:25:55 -06:00
ben-cohen
e7b668e705 Part the third 2017-12-01 12:40:19 -08:00
Ben Cohen
b31cb302fe Part the second 2017-12-01 11:49:10 -08:00
ben-cohen
6d22ded529 Part the first 2017-11-30 20:11:18 -08:00
Nate Cook
45c4c47393 [stdlib] Make DoubleWidth conform to Unsigned/SignedInteger 2017-11-30 21:58:26 -06:00
Max Moiseev
409c2437a4 Remove the GYB artifact from [NFC] 2017-11-30 18:51:34 -08:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -08:00
samding01
e1db602212 Fix VarArgs.swift test case for s390x (#12792) 2017-11-30 14:08:52 -08:00
Doug Gregor
33de34bc38 Merge pull request #13178 from DougGregor/coding-conditional-conformances
[Coding] Make Codable conformances for Optional and collections conditional.
2017-11-30 13:43:30 -08:00
Saleem Abdulrasool
9ea988f22d Merge pull request #12758 from compnerd/ELF-registration
ELF registration Restructuring
2017-11-30 11:20:53 -08:00
Doug Gregor
89343e2c98 [Coding] Make Codable conformances for Optional and collections conditional.
Array, Set, Dictionary, and Optional all provide unconditional conformances
to Encodable & Decodable that dynamically check whether their type arguments
are Encodable/Decodable. Now that we have conditional conformances, make
these unconditional conformances properly conditional, removing all of
the Swift 4-era type-erasure hacks.

Fixes rdar://problem/34989162.
2017-11-30 11:06:29 -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
Christian Bieniak
ec0d53f96f [stdlib] [SR-4005] Allow heterogenous comparisons in elementsEqual (#8045)
* [SR-4005] Allow heterogenous comparisons in elementsEqual

When a user is supplying a predicate to compare the type equivalence
isn’t required

* elementsEqualWithPredicate tests

Compares a string of a number with an integer value by using the
elementsEqualPredicate closure

* Update test expectations to use new sequence element types

* Update hardcoded test to reference sequence
2017-11-29 17:06:38 -08:00
Max Moiseev
66f8a9bbe0 Merge pull request #13007 from xwu/fused-multiply-add-stride
[stdlib] Eliminate intermediate rounding error in floating-point strides (and related gardening)
2017-11-29 11:35:14 -08:00
swift-ci
cdab55a202 Merge pull request #13124 from DougGregor/se-0143-experimental-flag 2017-11-28 16:59:27 -08:00
Doug Gregor
b59c30c1af [SE-0143] Put conditional conformances behind an "experimental" flag.
Conditional conformances aren't quite ready yet for Swift 4.1, so
introduce the flag `-enable-experimental-conditional-conformances` to
enable conditional conformaces, and an error when one declares a
conditional conformance without specifying the flag.

Add this flag when building the standard library (which will vend
conditional conformances) and to all of the tests that need it.

Fixes rdar://problem/35728337.
2017-11-28 16:01:51 -08:00
Hamish
4b3f0374c8 [stdlib] Don't check for native when known native in ensureNativeBuffer() 2017-11-28 19:34:01 +00:00