Using an Array to hold onto all the cleanup objects for an access happens to destroy the cleanup objects in FIFO order (and it's probably not a good idea to rely on Array cleaning itself up in any particular order at all). For want of proper accessor coroutines, chain the cleanup objects in a linked list so that they reliably get destroyed in the desired inside-out order. Fixes SR-5442 | rdar://problem/33267959.
The simplest way to keep the string buffer alive is simply to always grab its
iterator, even if we're not going to use it. Thanks @milseman for that idea and
@jckarter for the diagnosis help!
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.
I failed to merge the upstream changes to swift-corelibs-foundation at the same
time as I merged that #9806, and it broke on linux. Going to get it right this
time.
A necessary precursor to supporting subscripts and unspecialized generic accessors in general. Give get/set components the ability to have an "argument" area that gets instantiated by copying out of the key path pattern arguments at instantiation time, and which holds "witness" information for how to copy, destroy, equate, and hash arguments.
This PR updates `_FixedArray${N}` to conform to `ExpressibleByIntegerLiteral` rather than `IntegerLiteralConvertible`. This silences a compiler warning (actually, several).
For the benefit of unkeyed containers, coding paths currently contain optional `CodingKey`s — unkeyed containers are allowed to report a `nil` key in a path. However, this is unhelpful for debugging purposes, or inspecting the coding path for context, since any unkeyed container simply reports `nil`, whether it’s at index 1 or 1000.
Now all containers are required to report a non-optional CodingKey for their segment of the coding path, and coding paths are now exposed as `[CodingKey]`.