Commit Graph

22 Commits

Author SHA1 Message Date
Nate Cook
45c4c47393 [stdlib] Make DoubleWidth conform to Unsigned/SignedInteger 2017-11-30 21:58:26 -06:00
Ben Cohen
dcab9493ae Removed some warnings (#12753) 2017-11-30 15:12:56 -08:00
Nate Cook
abb75bca1a Allow large integer literals for DoubleWidth 2017-11-24 22:48:35 -06:00
Max Moiseev
a24998a5b1 [stdlib] Add missing @_fixed_layout attributes to fix resilience build 2017-10-02 15:19:06 -07:00
Max Moiseev
53b8419279 [stdlib] Make all the stdlib APIs @_inlineable
This change in theory should allow us to remove a special stdlib-only
sil-serialize-all compilation mode.

<rdar://problem/34138683>
2017-09-29 11:26:56 -07:00
Roman Levenstein
762731940d Force specialization of a very big function quotientAndRemainder for the most popular values of generic type parameters.
This reduces the amount of work to be done on the client side, because specializations from the stdlib can be used there.
2017-08-21 16:16:16 -07:00
Nate Cook
4e45358a49 Merge branch 'master' into nc-dwformatting 2017-08-02 14:54:56 -05:00
Nate Cook
a7ce287a53 Merge branch 'master' into integers-revised 2017-07-28 12:23:48 -05:00
Nate Cook
1952128dca DoubleWidth feedback from @moiseev 2017-07-27 22:51:46 -05:00
Maxim Moiseev
47e78c071a Merge pull request #11044 from apple/rationalize-bitshifting
[stdlib] Rationalize bitshifting in protocols
2017-07-27 14:50:14 -07:00
Max Moiseev
1c3e597928 [stdlib] Get rid of ArithmeticOverflow type 2017-07-26 11:09:36 -07:00
Maxim Moiseev
5d47a0d98d [stdlib] init<T : FloatingPoint> ==> init<T : BinaryFloatingPoint> 2017-07-26 11:09:36 -07:00
Maxim Moiseev
a5ff35cd41 [stdlib] extendingOrTruncating: => truncatingIfNeeded: 2017-07-26 11:09:36 -07:00
Nate Cook
7e5c78c1d4 [stdlib] DoubleWidth formatting and bit shift audit 2017-07-24 19:37:32 -05:00
Nate Cook
47d050ecb3 [gardening] Fix inconsistencies in DoubleWidth 2017-07-24 19:35:59 -05:00
Dave Abrahams
33e9ec4690 [stdlib] Rationalize bitshifting in protocols
Only FixedWidthInteger, not BinaryInteger, should have masking shifts.
BinaryInteger should have a non-masking shift requirement.

Removed some dead code.
2017-07-18 16:00:44 -07:00
Dave Abrahams
c497969987 [stdlib] Swift4 Modernizations Compatible with Swift 3.2 2017-07-14 17:54:33 -07:00
Károly Lőrentey
826f8daf4a [stdlib] _lowUWord => _lowWord 2017-07-10 22:40:52 +02:00
Károly Lőrentey
c8d4fd4242 [stdlib] Remove BinaryInteger._word(at:)
Removes BinaryInteger's _word(at:) requirement and its
countOfRepresentedWords property, making the words property the
sole way to access an integer's words.

This is a better fix for https://bugs.swift.org/browse/SR-5275.
2017-07-10 22:40:52 +02:00
Károly Lőrentey
7836268d45 [stdlib] Implement BinaryInteger.words in standard integer types.
Introduces the following new collection types as lightweight
views of a corresponding integer value:

- UInt.Words
- UInt64.Words (on 32-bit platforms)
- DoubleWidth.Words

The rest of the standard integer types define Words as a typealias
to one of the first two of these, based on their width.
2017-07-10 19:03:34 +02:00
Xiaodi Wu
f8688d2f97 Update DoubleWidth.swift.gyb 2017-06-21 20:03:48 -05:00
Nate Cook
6133adc413 [stdlib] Move DoubleWidth into its own file 2017-06-06 08:54:15 -07:00