Commit Graph

8969 Commits

Author SHA1 Message Date
Dave Abrahams
ce804529a1 [stdlib] Dump _StringStorage.grow()
This implementation detail was adding lots of needless complexity
2017-05-31 16:12:22 -07:00
Dave Abrahams
5f0b33f04d [stdlibunittest] _Element => Element 2017-05-31 15:56:57 -07:00
Michael Ilseman
44cccba22d [stdlib] Change dynamic check to sanity check.
Double-checking for CR-LF is redundant in
_internalExtraCheckGraphemeBreakBetween. Add in a sanity check and
omit the overly conservative CR check.
2017-05-31 14:55:24 -07:00
Michael Ilseman
0a88de53d3 [stdlib] Grapheme break fast-paths for Cyrillic, Arabic, Hangul
Add in more grapheme break fast paths for scripts based on Cyrillic,
Arabic, or Hangul. Generates significant performance wins, similar to
those for the unihan fast paths.

While every extra check does slow down the runtime of
_internalExtraCheckGraphemeBreakBetween as currently implemented, I've
not found the performance cost to be relevant for workloads with
occasional mixed emoji contents, nor for workloads that his the
earlier checks. A pure Korean workload (currently the last check) does
pays a rather noticable price for the previous checks, but this is
only because the workload is now so greatly improved. Optimizing this
implementation is interesting future work, but not urgent.
2017-05-31 11:09:43 -07:00
swift-ci
9e76bc371d Merge pull request #9771 from Jnosh/patch-1 2017-05-30 13:09:15 -07:00
John Holdsworth
d600e7581d Use #elif 2017-05-30 20:16:40 +01:00
Maxim Moiseev
6c836dbd04 Merge pull request #9949 from moiseev/renames
[stdlib] Renames and tests for Swift 3 compatibility mode
2017-05-30 10:26:01 -07:00
Chris Amanse
c783d27f17 Remove for loop in computing mantissa double value (#8804) 2017-05-27 13:53:25 -07:00
Max Moiseev
53004a1015 [stdlib] Renames and tests for Swift 3 compatibility mode
Addresses <rdar://problem/32432481>
2017-05-26 16:28:11 -07:00
swift-ci
f07337e623 Merge pull request #9946 from moiseev/array-filter-resiliency 2017-05-26 14:40:22 -07:00
michael-yuji
e97123f9f7 A patch to make swiftc build in FreeBSD (#9940) 2017-05-26 13:36:48 -07:00
Max Moiseev
612a07fc73 [stdlib] Fixing build with -swift-stdlib-enable-resiliency
Fixes: <rdar://problem/32409661>
2017-05-26 13:18:00 -07:00
Janosch Hildebrand
ba067aa9c8 [Documentation] Add missing 'of' to UnicodeScalar documentation. 2017-05-26 21:23:04 +02:00
Joe Groff
8022266404 Merge pull request #9933 from jckarter/partial-key-path-application
Support application of AnyKeyPath/PartialKeyPath.
2017-05-26 08:45:55 -07:00
Nate Cook
2612e00eaf Additional notes from @xwu 2017-05-26 08:46:42 -05:00
Alex Blewitt
3b628d32fc Fix typo in renamed function SR-5015 (#9939) 2017-05-26 06:41:39 -07:00
Nate Cook
2f9bf3cb1c Add an abstract for DoubleWidth 2017-05-25 18:38:45 -05:00
Nate Cook
1149eeac16 Incorporate feedback from @moiseev
- Also clean up some 80-column issues
- And improve some tests from before literal expressibility
2017-05-25 18:32:15 -05:00
Dave Abrahams
4cb60a0873 Merge pull request #9915 from apple/swift-3-api-preserving-changes
Swift 3 api preserving changes
2017-05-25 16:31:36 -07:00
Joe Groff
cdc7a5c945 Support application of AnyKeyPath/PartialKeyPath.
rdar://problem/32237567
2017-05-25 15:51:22 -07:00
Nate Cook
237d8775dc Catch overflow into high bit in signed multiplication 2017-05-25 15:04:34 -05:00
Amr Aboelela
7ba2af6b9d Fix by using __ANDROID__ #if 2017-05-25 10:34:12 -07:00
Nate Cook
e5fb87128e Revert multipliedFullWidth for 64-bit ints on 32-bit platforms 2017-05-25 03:47:52 -05:00
practicalswift
0d2b0cc666 Merge pull request #9911 from practicalswift/gardening-20170524
[gardening] Add copyright header. Fix \t:s and spacing. Use isa instead of dyn_cast where appropriate.
2017-05-25 08:06:56 +02:00
Nate Cook
5ab34bf6f0 Add floating-point initializers and tests 2017-05-24 19:16:26 -05:00
Nate Cook
06490e6a44 Shortcut on binary division 2017-05-24 19:16:26 -05:00
Nate Cook
7353042a4f Fix overflow issue 2017-05-24 19:16:26 -05:00
Nate Cook
1e59f65a91 Implement tricky full-width multiply/divides 2017-05-24 19:16:26 -05:00
Nate Cook
2edbb085d0 Fix overflow issues 2017-05-24 19:16:26 -05:00
Nate Cook
788f4e81b6 Add recursive constraints for integer Magnitude 2017-05-24 19:16:26 -05:00
Nate Cook
b935be828c Remove endian operations from fixed-width ints 2017-05-24 19:16:26 -05:00
Nate Cook
b72449bc72 Provide implementations or masking bitshift operators 2017-05-24 19:16:26 -05:00
Nate Cook
a539919052 Add negation operator/method to DoubleWidth 2017-05-24 19:16:26 -05:00
Nate Cook
c866bcf3d4 Convert endian symbols to default implementations 2017-05-24 19:16:26 -05:00
Nate Cook
b2676f90ca Use literals instead of DoubleWidth inits 2017-05-24 19:16:26 -05:00
Nate Cook
8926df9bbc [stdlib] Partial implementation of DoubleWidth 2017-05-24 19:16:26 -05:00
Dave Abrahams
807410b99e [stdlib] Make String("...") non-failable in Swift 4 2017-05-24 16:11:34 -07:00
Dave Abrahams
6cea7c1b5d [stdlib] Correct constraints on disambiguating overload
/cc @moiseev
2017-05-24 16:11:16 -07:00
Dave Abrahams
801b9c5544 [stdlib] Move specialization from init to append
Since init just calls append anyway, it's 2 birds/1 stone
2017-05-24 16:10:34 -07:00
Pavol Vaskovic
f123404f95 Every dot counts. Period. 2017-05-25 00:08:19 +02:00
practicalswift
7e6830763a [gardening] Fix recently introduced \t:s 2017-05-24 21:27:47 +02:00
practicalswift
1283248ebd [gardening] Add missing copyright header 2017-05-24 21:27:28 +02:00
Dave Abrahams
52cf9e52c4 Merge pull request #9811 from palimondo/struct-the-class
[stdlib] Sequence internals with struct instead of class.
2017-05-24 12:05:34 -07:00
Philippe Hausler
c40ba96328 [Foundation] Correct data subscript indexing to be offset from the base index (#9816) 2017-05-24 09:43:56 -07:00
Dave Abrahams
794a287c27 Kill a stray TAB
How'd that get in there?

Thanks, @moiseev
2017-05-24 04:10:25 -07:00
Maxim Moiseev
96b5b77081 Merge pull request #9888 from moiseev/unambiguous-array-filter
[stdlib] Moving the Array.filter to _ArrayProtocol
2017-05-23 20:59:28 -07:00
Xiaodi Wu
afa4e12fa6 Refine wording in doc comment 2017-05-23 21:10:04 -05:00
Xiaodi Wu
e30a003bca Update BinaryInteger default initializer documentation
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.
2017-05-23 21:07:16 -05:00
Max Moiseev
5590872b35 [stdlib] Moving the Array.filter to _ArrayProtocol
Resolves ambiguity in the following expression

  _ = Array(0..<10).lazy.flatMap { .some($0) }.filter { _ in false }

Fixes: <rdar://problem/32316948>
2017-05-23 17:32:23 -07:00
Dave Abrahams
399193ff30 Merge pull request #9847 from apple/eliminate-_Element
[stdlib] Eliminate _Element
2017-05-23 16:44:55 -07:00