Commit Graph

6693 Commits

Author SHA1 Message Date
David Smith
cffe105d98 Merge pull request #41964 from Catfish-Man/single-instruction-multiple-ifdef
Only use SIMD when stdlib vector types are available
2022-03-23 14:05:13 -07:00
swift_jenkins
1dd02c09e8 Merge remote-tracking branch 'origin/main' into next 2022-03-22 19:00:53 -07:00
David Smith
398de941b6 Merge pull request #41897 from Catfish-Man/we-control-the-horizontal
Stay in vectors longer before doing a horizontal sum
2022-03-22 18:54:40 -07:00
David Smith
c05e47dd60 Only use SIMD when stdlib vector types are available 2022-03-22 15:48:24 -07:00
swift_jenkins
76f91dbe18 Merge remote-tracking branch 'origin/main' into next 2022-03-18 16:41:36 -07:00
David Smith
36b41d4940 Merge pull request #41869 from Catfish-Man/stack-promotion-and-ar-raise
Use withUnsafeTemporaryAllocation instead of a temporary Array
2022-03-18 16:27:31 -07:00
David Smith
dbaada435c Stay in vectors longer before doing a horizontal sum 2022-03-18 15:27:40 -07:00
swift_jenkins
1e556247b1 Merge remote-tracking branch 'origin/main' into next 2022-03-18 10:01:20 -07:00
David Smith
cb082e185c Merge pull request #41866 from Catfish-Man/what-a-crumb-y-optimization
Vectorize UTF16 offset calculations
2022-03-18 09:53:55 -07:00
David Smith
9ad3c9a5db Use withUnsafeTemporaryAllocation instead of a temporary Array 2022-03-17 17:08:05 -07:00
David Smith
eaf3f316ec Vectorize UTF16 offset calculations 2022-03-17 14:18:21 -07:00
swift_jenkins
2f51506809 Merge remote-tracking branch 'origin/main' into next 2022-03-16 15:40:24 -07:00
Guillaume Lessard
b17b1a9d04 Merge pull request #41836 from glessard/sr15994
[stdlib] tolerate empty source buffers in `UMRBP.copyMemory`
2022-03-16 16:24:44 -06:00
Guillaume Lessard
e40e0f7580 [stdlib] improve UnsafeMutableRawBufferPointer.copyMemory
- The previous implementation trapped when the source buffer was empty. That behaviour is both not documented and unnecessary. If the source buffer is empty, its length is necessarily shorter or equal than the length of the destination.
- The updated version simply returns when the source buffer is empty.
2022-03-16 10:05:21 -06:00
swift_jenkins
89c623f6de Merge remote-tracking branch 'origin/main' into next 2022-03-15 10:00:42 -07:00
Konrad `ktoso` Malawski
4fa0855907 [Distributed] RemoteCallTarget now pretty prints and hides mangled names 2022-03-15 17:34:04 +09:00
swift_jenkins
180b575cd5 Merge remote-tracking branch 'origin/main' into next 2022-03-14 12:20:40 -07:00
Alejandro Alonso
27e6241a41 Merge pull request #41389 from Azoy/fix-indic-sequences
[stdlib] Fix backwards count of Indic graphemes
2022-03-14 12:08:21 -07:00
swift_jenkins
c2946e7d62 Merge remote-tracking branch 'origin/main' into next 2022-03-10 20:20:50 -08:00
Doug Gregor
ea89407304 Extend the lifetime of the buffer while copying from a _CocoaArrayWrapper
Fixes rdar://90108215.
2022-03-10 18:03:07 -08:00
swift_jenkins
b50c587501 Merge remote-tracking branch 'origin/main' into next 2022-03-08 08:41:06 -08:00
André Mello
af461ec5a4 Improve description of the pi constant (#41585) 2022-03-08 11:21:14 -05:00
swift_jenkins
0e494ea5bd Merge remote-tracking branch 'origin/main' into next 2022-03-07 22:20:58 -08:00
Nate Cook
544d10f2cb Fix error in MutableCollection.shuffle() docs 2022-03-07 22:17:58 -06:00
swift_jenkins
5c4bac9d1f Merge remote-tracking branch 'origin/main' into next 2022-03-07 15:20:55 -08:00
Robert Widmann
7cd3541c62 Merge pull request #41656 from MillerTechnologyPeru/feature/ppc32
[stdlib] Added PowerPC 32-bit support
2022-03-07 15:08:26 -08:00
swift_jenkins
6626d91625 Merge remote-tracking branch 'origin/main' into next 2022-03-07 12:01:13 -08:00
Saleem Abdulrasool
9be5586688 Merge pull request #41705 from compnerd/arm64-long
core: map UnsignedLong to UInt32
2022-03-07 11:47:19 -08:00
swift_jenkins
fe8398658f Merge remote-tracking branch 'origin/main' into next 2022-03-07 11:02:05 -08:00
Alex Martini
6491da8b62 Merge pull request #41339 from amartini51/BidirectionalCollection_88709422
Add missing word & slightly clarify.
2022-03-07 10:52:53 -08:00
Saleem Abdulrasool
20ade9b602 core: map UnsignedLong to UInt32
Windows ARM64 is a LLP64 platform, which means that `unsigned long` is a
32-bit value.  This was already mapped properly for x86_64, but somehow
had missed ARM64.  This repairs that which is required for building the
standard library.
2022-03-07 08:11:42 -08:00
swift_jenkins
3e64a66b04 Merge remote-tracking branch 'origin/main' into next 2022-03-05 12:21:09 -08:00
Guillaume Lessard
f4d56d3734 Merge pull request #41679 from amartini51/trailing_double_tab
Remove trailing double tabs
2022-03-05 13:16:24 -07:00
Alsey Coleman Miller
0ab3eec987 Added PowerPC 32-bit support 2022-03-03 22:21:33 -05:00
swift_jenkins
3042d132a0 Merge remote-tracking branch 'origin/main' into next 2022-03-03 12:21:14 -08:00
Guillaume Lessard
bc3a9d287f Merge pull request #41392 from amartini51/UnsafeMutableRawBufferPointer_storeBytes_88982081
Add missing parameter in doc comment.
2022-03-03 13:14:20 -07:00
swift_jenkins
40852e11cc Merge remote-tracking branch 'origin/main' into next 2022-03-01 16:41:46 -08:00
Karoy Lorentey
1da581642c Merge pull request #41599 from lorentey/string-unicodescalarview-index-validation
[stdlib] String.UnicodeScalarView: Fix some index validation issues
2022-03-01 16:27:34 -08:00
Karoy Lorentey
20c293ee18 Merge pull request #41598 from lorentey/string-index-validation
[stdlib] String.index(before:): Fix index validation issues
2022-03-01 16:27:03 -08:00
Alex Martini
17d3b01b48 Remove trailing double tabs. 2022-03-01 14:46:40 -08:00
swift_jenkins
1abe4b3310 Merge remote-tracking branch 'origin/main' into next 2022-03-01 12:41:06 -08:00
Guillaume Lessard
577015f5be Merge pull request #39639 from glessard/se-pointer-convenience
SE-0334: Pointer API Usability Improvements
2022-03-01 13:24:25 -07:00
Karoy Lorentey
6f9edc8be8 [stdlib] String.UnicodeScalarView: Fix some index validation issues
`String.UnicodeScalarView` currently lacks proper index validation in its `index(after:)` and `index(before:)` methods, leading to out-of-bounds memory accesses when index navigation methods in this view are given invalid indices.

(Also see https://github.com/apple/swift/pull/41598 and https://github.com/apple/swift/pull/41417)

rdar://89498541
2022-02-28 19:49:22 -08:00
Karoy Lorentey
5b364c4e2b [stdlib] String.index(before:): Fix index validation issues
`String.index(before:)` (and methods that rely on it, such as `Substring.index(before:)`, `.distance(from:to:)` etc.) does not currently verify that the given index falls before the `endIndex` before aligning it to a scalar boundary. This allows an out-of-bounds memory access when the provided index points to a position beyond the end of `self`’s storage.

Additionally, the `i > startIndex` check needs to be done after scalar alignment, not before, as alignment can round the index down to `startIndex`.

rdar://89497074&89495373
2022-02-28 17:26:52 -08:00
swift_jenkins
c90e2eae0d Merge remote-tracking branch 'origin/main' into next 2022-02-28 15:41:21 -08:00
Guillaume Lessard
ee08dc9951 Merge pull request #41586 from stephentyrone/order-of-operations-is-hard
|| has higher precedence than the ternary operator
2022-02-28 16:33:46 -07:00
swift_jenkins
1cfdef4807 Merge remote-tracking branch 'origin/main' into next 2022-02-28 15:01:20 -08:00
Karoy Lorentey
57af818823 Merge pull request #41548 from lorentey/simplify-failEarlyRangeCheck
[stdlib] Collection: simplify default _failEarlyRangeCheck implementations
2022-02-28 14:52:31 -08:00
Karoy Lorentey
d2673ed342 Merge pull request #41572 from lorentey/stop-mentioning-IndexDistance
[stdlib] Mark String.IndexDistance as deprecated and stop mentioning it in method signatures
2022-02-28 14:50:58 -08:00
Stephen Canon
b520063e53 || has higher precedence than the ternary operator, so this check didn't work. 2022-02-28 15:33:27 -05:00