Adds a internal-only fixed size array, which we will be using in
String as a buffer of code units. This is basically just a wrapper
around a tuple that provides a random access collection
interface. This is gyb-ed up to scale up to arbitrary sizes, as
specified by the "sizes" gyb variable.
* Update {JSON,PropertyList}Decoder to allow superDecoder()s to wrap
null value so current implementations of collections can decode
contained objects from nil
To make it slightly easier to tell at a glance if a method is
implemented as part of API (public/open), shared implementation detail
(fileprivate), or implementation detail meaningful only to a given type
(private).
* Add encodeNil(forKey:)/encodeNil() for keyed/unkeyed encoding
containers
* Add decodeNil(forKey:)/decodeNil() for keyed/unkeyed decoding
containers
* Give default implementation of decodeIfPresent(forKey:)/
decodeIfPresent(_:) on keyed/unkeyed decoding containers instead of
decode(forKey:)/decode(_:)
* Expose all encode/decode methods on keyed encoding & decoding
containers to allow overriding default methods (which were previously
not forwarding)
Many strings use non-sub-300 punctuation characters (e.g. unicode
hyphen, CJK quotes, etc). This can cause switching between fast and
slow paths for grapheme breaking. Add in fast-paths for general
punctuation characters and CJK punctuation and symbol characters.
This results in about a 5-8x speedup for heavily (unicode) punctuated
Latiny and CJKy workloads.
Allow JSONEncoder/JSONDecoder to intercept Decimal values so they get
a numeric representation in JSON (instead of their default keyed
implementation).
* Extend Swift runtime issue reporting for @objc inference to include details about the declaration of the method (that is missing the @objc annotation) and a suggested fix-it. This changes the ABI of RuntimeErrorDetails, so we're also bumping the version.
* Update SwiftObject.mm
On encode, we previously treated every container request as a push;
instead, we should allow the same container type to be requested
multiple times so a class can pass its Encoder directly to its
superclass if it needs to.
The unarchiveTopLevelObjectWithData which returns Any? (instead of
AnyObject?) was added in Swift 4 and has only shipped in the betas so
far. Instead of adding new overloads which take different types, we
should just fix this one and call it a day.
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.
We missed a few NSKeyedUnarchiver methods during our original renaming
for Swift — some of these methods still take NSData when they can take
Data. We can add Data variants which bridge to NSData to fix this in a
backwards-compatible way.