Only FixedWidthInteger, not BinaryInteger, should have masking shifts.
BinaryInteger should have a non-masking shift requirement.
Removed some dead code.
This adds 8 more collection views, but makes integer definitions
more consistent across all the available bit widths and
between 32-bit and 64-bit platforms.
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.
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.
Per comments, `countRepresentedWords` is slated for eventual removal along with `_words(at:)`; it's not a part of SE-0104, so let's show users that it's not intended for public consumption.
When this initializer is invoked with an integer literal, the expression
is ambiguous, since both UIn32 and Float are
RepresentableByIntegerLiteral.
Fixes: https://bugs.swift.org/browse/SR-5176
Some time ago, it was pointed out that "truncating" would be used only for bit pattern operations. As pointed out on Swift Evolution, this is the only spot where the same term is used for dropping the fractional part of a floating point value; elsewhere, it is always spelled--even in documentation--as "rounded toward zero." This PR updates the usage here to align with existing convention.
It looks like the compiler is having troubles with the pattern when the
non-mutaing operator is defined on the protocol, and delegates to the
mutating version, that is provided by the concrete type. Adding similar
definitions of non-mutating operators to concrete types significantly
speeds up the typechecking of complex expressions, like the one in
the ByteSwap benchmark.
* Give Sequence a top-level Element, constrain Iterator to match
* Remove many instances of Iterator.
* Fixed various hard-coded tests
* XFAIL a few tests that need further investigation
* Change assoc type for arrayLiteralConvertible
* Mop up remaining "better expressed as a where clause" warnings
* Fix UnicodeDecoders prototype test
* Fix UIntBuffer
* Fix hard-coded Element identifier in CSDiag
* Fix up more tests
* Account for flatMap changes
* removing .characters from examples
* beginning new String doc revisions
* improvements to the String Foundation overlay docs
* minor revisions elsewhere