Paul Hudson
06f82a53b5
Replaced the majority of ' : ' with ': '.
2019-07-18 20:46:07 +01:00
Ben Cohen
e9d4687e31
De-underscore @frozen, apply it to structs ( #24185 )
...
* De-underscore @frozen for enums
* Add @frozen for structs, deprecate @_fixed_layout for them
* Switch usage from _fixed_layout to frozen
2019-05-30 17:55:37 -07:00
Michael Ilseman
4967fc08eb
[Unicode] Add convenience APIs to Unicode encodings
...
Add convenience APIs to the stdlib's Unicode encodings:
* Unicode.UTF16
* isASCII
* isSurrogate
* Unicode.UTF8
* isASCII
* width
* Unicode.UTF32
* isASCII
* Unicode.ASCII
* isASCII
Tests added
2019-03-29 15:43:00 -07:00
Ben Cohen
1673c12d78
[stdlib] Replace "sanityCheck" with "internalInvariant" ( #20616 )
...
* Replace "sanityCheck" with "internalInvariant"
2018-11-15 20:50:22 -08:00
Michael Ilseman
cd35876fa5
[Unicode] Publish Unicode ABI
...
De-genericize one axis of storage buffers to speed up compilation time
of stdlib and user code. Publish the rest as ABI, since we're out of
time to reevaluate the design.
2018-11-15 11:06:33 -08:00
Doug Gregor
ee1713ce67
[Standard library] Break up another “large” expression.
...
Bitwise arithmetic is a killer for the type checker :(. Shave off another
half second of typecheck time in the standard library.
2018-07-27 15:37:59 -07:00
Slava Pestov
2e5aef9c8d
stdlib: Remove redundant @usableFromInline attributes
2018-04-06 00:02:30 -07:00
Slava Pestov
e1f50b2d36
SE-0193: Rename @_inlineable to @inlinable, @_versioned to @usableFromInline
2018-03-30 21:55:30 -07:00
Jordan Rose
9034ba617b
Ban @_fixed_layout on enums in favor of @_frozen
...
In theory there could be a "fixed-layout" enum that's not exhaustive
but promises not to add any more cases with payloads, but we don't
need that distinction today.
(Note that @objc enums are still "fixed-layout" in the actual sense of
"having a compile-time known layout". There's just no special way to
spell that.)
2018-03-20 14:49:10 -07:00
Michael Ilseman
3be2faf5d3
[String] Initial implementation of 64-bit StringGuts.
...
Include the initial implementation of _StringGuts, a 2-word
replacement for _LegacyStringCore. 64-bit Darwin supported, 32-bit and
Linux support in subsequent commits.
2018-01-21 12:32:26 -08: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
Maxim Moiseev
a5ff35cd41
[stdlib] extendingOrTruncating: => truncatingIfNeeded:
2017-07-26 11:09:36 -07:00
Xiaodi Wu
5d731c8a93
Make a fix-up to account for operator precedence
2017-07-06 20:01:09 -05:00
Xiaodi Wu
3528479730
Silence compiler warnings
2017-07-05 23:56:44 -05:00
Dave Abrahams
7db9ba8dd2
[stdlib] Replace UTF8.EncodedScalar
...
This is a way of testing infrastructure for an updated UTF8View iterator
2017-06-03 13:08:11 -07:00
Dave Abrahams
41c244a065
[stdlib] Unicode[Encoding|Parser] => Unicode.[Encoding|Parser]
2017-05-11 17:21:39 -07:00
Dave Abrahams
ddf7ad517f
UnicodeScalar => Unicode.Scalar
2017-05-11 15:23:25 -07:00
Dave Abrahams
97f875ad84
[stdlib] De-underscore Unicode "namespace"
2017-05-11 15:23:25 -07:00
Dave Abrahams
e7b32f9dc9
[stdlib] UnicodeEncoding: hide/internalize APIs we're not sure about
...
The best high-level APIs for decoding/transcoding are still under active
investigation. It's likely we want more views. Therefore, leave
de-underscored/public only the lowest-level APIs for now.
2017-05-09 10:20:29 -07:00
Dave Abrahams
f4610e1638
[stdlib] encode/transcode => [encode/transcode]IfRepresentable...
...
...to make room for a more useful encode/transcode that inject replacement
characters when encoding fails.
2017-05-07 20:43:44 -07:00
Dave Abrahams
e08fd9af46
[stdlib] Direct unicode transcoding
...
without passing through decoded UnicodeScalars.
2017-05-06 16:58:08 -07:00
Dave Abrahams
796d004fd0
[stdlib] Allow Unicode Encoding to fail
...
This is needed for encodings such as Latin-1
2017-05-06 16:53:35 -07:00
Dave Abrahams
bea71aa80e
[stdlib] Legacy UTF16 decoding in terms of new components
2017-05-04 11:03:46 -07:00
Dave Abrahams
feea061d32
[stdlib] Move new Unicode decoders into the stdlib
...
No expected change in benchmarks, as legacy components aren't using this yet.
2017-05-01 17:08:08 -07:00