Alexis Beingessner
2ac37cb76e
Merge pull request #5690 from Gankro/versioned
...
WIP fix resilience build
2016-11-09 12:47:36 -05:00
Doug Gregor
320e439f24
[Standard library] Duplicate subscript requirement in RandomAccessCollection.
...
Similar to what we did for BidirectionalCollection, duplicate the
subscript-returning-SubSequence requirement in
RandomAccessCollection.
2016-11-08 16:35:26 -08:00
Alexis Beingessner
9ad14ea890
WIP fix resilience build
2016-11-08 19:12:26 -05:00
Doug Gregor
f786a9a230
[Standard library] Duplicate subscript requirement in BidirectionalCollection.
...
The BidirectionalCollection protocol has no requirements that mention
the associated type 'SubSequence', which means it cannot be easily
inferred. Duplicate the subscript requirement from Collection into
BidirectionalCollection to aid type witness inference.
2016-11-08 16:11:30 -08:00
Doug Gregor
6f362357b2
[Random access collection] Weaken constraints for 'indices' default.
...
Extensions of the RandomAccessCollection protocol provide two
mutually-incompatible default implementations for 'indices', one of
which uses DefaultRandomAccessIndices<Self> and the other uses
CountableRange<Index>. Type witness inference (rightly) considers the
two ambiguous, although it didn't before, causing regressions.
Remove the same-type constraint
SubSequence == DefaultRandomAccessIndices<Self>
from the most general extension, so that the more-specialized,
CountableRange version is selected when it's constraints are met, and
the most-general version is selected otherwise.
The down-side to this change is that the most-general version of
'indices', which produces a DefaultRandomAccessIndices<Self>, will be
available in all types that conform to RandomAccessCollection, even if
they have a different Indices type.
2016-11-08 16:11:30 -08:00
Alexis Beingessner
5fdd0c7b5b
revert _CocoaDictionaryBuffer indexing design
...
The use of a lazy var crashes the swift module (de)serializer.
2016-11-07 21:28:24 -05:00
practicalswift
4552fc8f88
[gardening] Use American English: "behaviour" → "behavior"
2016-11-05 20:33:57 +01:00
practicalswift
debeebaa3a
[gardening] Fix recently introduced typo: "nsenumator" → "nsenumerator"
2016-11-05 20:32:25 +01:00
Alexis Beingessner
c565c7ca02
Merge pull request #5291 from Gankro/dsindex
...
[stdlib] Rewriting native hashed collection indices
2016-11-04 11:21:57 -04:00
Alexis Beingessner
e4c5e159c9
remove useless constant redefinition
2016-11-04 03:17:13 -04:00
Alexis Beingessner
3cdc8ec444
remove buffer header to eliminate optional traps
2016-11-04 02:44:29 -04:00
Alexis Beingessner
931f7ba658
actually used the cached keys/values pointer
2016-11-04 01:19:50 -04:00
Alexis Beingessner
5e776e5e39
cleanup initializers in HashedCollections
2016-11-04 01:19:50 -04:00
Alexis Beingessner
428cdac57c
leave FIXME for future dictionary bucaneers
2016-11-04 01:01:35 -04:00
Alexis Beingessner
a62f6c6a89
Fix incorrect bitcasts, refactor code to guard against this error.
2016-11-04 01:01:35 -04:00
Alexis Beingessner
b4d97776d8
more comment cleanups
2016-11-04 01:01:35 -04:00
Alexis Beingessner
731aa1494b
Properly if-def out bridging code.
2016-11-03 19:55:36 -04:00
Alexis Beingessner
bb0b4be7ac
Update comment to clarify why it's interesting, link a relevant impl.
2016-11-03 19:55:36 -04:00
Alexis Beingessner
8eea522e9c
rename storage type to be more useful
2016-11-03 19:52:30 -04:00
Alexis Beingessner
b1425ce78b
remove _'s from some variables that don't need it
2016-11-03 19:52:30 -04:00
Alexis Beingessner
41fb15f042
rename Buffer <---> Storage in HashedCollections to match conventions
2016-11-03 19:52:30 -04:00
Alexis Beingessner
3144870e86
add new toll-free bridge fast-paths to HashedCollections
2016-11-03 19:52:30 -04:00
Alexis Beingessner
a43c1dfba0
Some minor cleanups in HashedCollections:
...
* rename bridgingStorage to bridged
* add a missing fixLifetime
* remove useless temporary
2016-11-03 19:52:30 -04:00
Alexis Beingessner
f12d7914e8
update comments in HashedCollections to reflect new design
2016-11-03 19:52:30 -04:00
Alexis Beingessner
052e94a34a
refactor HashedCollections to support verbatim bridging
2016-11-03 19:52:30 -04:00
Alexis Beingessner
d179655952
refactor Dictionary to support an empty singleton
2016-11-03 19:52:30 -04:00
Max Moiseev
31c2aace4f
Specialized implementation of Strideable conformance for Int
2016-11-02 16:14:28 -07:00
Max Moiseev
252106fcc6
Revert "Speeding up Strideable conformance for integers"
...
This reverts commit 8789e627f6 .
2016-11-02 15:33:17 -07:00
Max Moiseev
e03f3d38cc
Adding a fixme to possibly remove minimumSignedRepresentationBitWidth
2016-11-02 15:32:58 -07:00
Max Moiseev
f832c0cccc
Changing preconditions in integer inits for better performance
2016-11-02 15:30:55 -07:00
Max Moiseev
8789e627f6
Speeding up Strideable conformance for integers
2016-11-02 13:44:08 -07:00
swift-ci
7a0e622f17
Merge pull request #5596 from DougGregor/stdlib-warnings
2016-11-01 23:30:37 -07:00
swift-ci
ad1406971f
Merge pull request #5595 from slavapestov/fixed-layout-workaround-corelibs-foundation
2016-11-01 23:19:33 -07:00
Doug Gregor
038558baf1
[Standard library] Address warnings. NFC
2016-11-01 23:10:04 -07:00
Slava Pestov
5ded13c8dd
stdlib: Make Unsafe{Mutable,}BufferPointer @_fixed_layout to work around rdar://18157434
2016-11-01 23:37:19 -06:00
Slava Pestov
c0f3d8d644
Fix broken build on ARM
...
There was a @_transparent extension lurking behind an #if, and CI pull
request testing doesn't build the standard library on ARM.
2016-11-01 22:32:38 -07:00
Slava Pestov
f63dff16c7
AST: Don't allow @_transparent on extensions
...
Quiz: What does @_transparent on an extension actually *do*?
1) Make all members @_transparent?
2) Allow your members to be @_transparent?
3) Some other magical effect that has nothing to do with members?
The correct answer is 1), however a few places in the stdlib defined
a @_transparent extension and then proceeded to make some or all members
also @_transparent, and in a couple of places we defined a @_transparent
extension with no members at all.
To avoid cargo culting and confusion, remove the ability to make
@_transparent extensions altogether, and force usages to be explicit.
2016-11-01 21:14:09 -07:00
Maxim Moiseev
70cf3633b5
Fixing the FloatingPoint.subtracting doc comment ( #5581 )
2016-11-01 20:13:08 -05:00
Max Moiseev
874930b80a
Implementing doubleWidthDivide
2016-11-01 16:32:44 -07:00
Max Moiseev
35dbab75d1
Proper availability attribute for toIntMax() method
2016-11-01 14:52:31 -07:00
Max Moiseev
8fdb6f007b
Uncommenting arithmetic operators in the FloatingPoint protocol
2016-11-01 14:42:54 -07:00
Max Moiseev
11132bde95
SeeAlso updated for the negate() function
2016-11-01 14:05:48 -07:00
Max Moiseev
79f1ff3694
Removing workarounds for <rdar://problem/29029561>
2016-11-01 12:03:27 -07:00
Max Moiseev
e51af7eb00
Merge branch 'master' into new-integer-protocols
2016-11-01 11:28:12 -07:00
Max Moiseev
9cd1d27ea1
Turning SignedArithmetic.negated() into a static prefix func -
2016-10-31 16:18:44 -07:00
Max Moiseev
2a576b9d6f
numericCast is wort keeping
2016-10-31 15:46:50 -07:00
Max Moiseev
fd42e0309e
Marking IntMax and UIntMax as obsoleted
2016-10-31 15:45:28 -07:00
Max Moiseev
51a3e22889
Marking init(truncatingBitPattern:) as obsoleted in Swift 4
2016-10-31 15:38:29 -07:00
Max Moiseev
d1a1570200
Addressing compiler warning for unsigned integers
2016-10-31 15:09:28 -07:00
Max Moiseev
205389a8ba
Marking workarounds for <rdar://problem/29029561>
2016-10-31 11:44:06 -07:00