Commit Graph

6693 Commits

Author SHA1 Message Date
swift-ci
8c515e418a Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 12:32:53 -07:00
Guillaume Lessard
4dffe2716f Merge pull request #59330 from glessard/rdar94296845-assertionFailure-docs
[docs] improvements for assertionFailure and preconditionFailure
2022-06-10 13:15:16 -06:00
swift-ci
8a59b92e7d Merge remote-tracking branch 'origin/main' into rebranch 2022-06-10 11:13:11 -07:00
Karoy Lorentey
6d2d2e0005 Merge pull request #38091 from glessard/indexing-model
[stdlib] fix an indexing inconsistency
2022-06-10 11:02:13 -07:00
Karoy Lorentey
35fc9ea772 Merge pull request #59117 from glessard/se0349-doctweak
[doc] mention `loadUnaligned` in the description of `UnsafeRawBufferPointer`
2022-06-10 11:00:59 -07:00
swift-ci
3597ca75f0 Merge remote-tracking branch 'origin/main' into rebranch 2022-06-09 02:52:39 -07:00
Guillaume Lessard
7a157f99ab [stdlib] use @_transparent in an appropriate spot 2022-06-08 13:49:18 -06:00
Guillaume Lessard
6219ae998d [docs] improvements for assertionFailure and preconditionFailure
- the previous docs for assertionFailure implies that it is a nonreturning function, which has always been wrong.
- the example usage previously given for assertionFailure was moved to preconditionFailure, where it is more appropriate.
2022-06-08 13:43:19 -06:00
Alastair Houghton
33f103f03e [Build] Fix some issues with the standalone library build.
When we're building static libraries, we don't need to include the
threading objects in both Concurrency and Core, and we also don't need
two copies of the threading library's fatal error handler.

rdar://90776105
2022-06-07 07:39:53 +01:00
Alastair Houghton
05cccf939b [Runtime][Windows] Need to link with Synchronization.lib.
We're using some functions from Synchronization.lib now, after the
threading changes.

rdar://90776105
2022-06-07 07:39:52 +01:00
Alastair Houghton
f5bdb858e0 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-06-07 07:39:51 +01:00
Lily Lin
a56e658df9 Fix ABI issue in NativeDictionary 2022-06-03 16:49:50 -07:00
Lily Lin
fbd70fe6eb Fix build error for linux builds and add basic validation test 2022-06-03 15:26:06 -07:00
Lily Lin
c6c0229070 Merge branch 'main' into lily-dictionary-optimization 2022-06-03 14:21:07 -07:00
Lily Lin
261216969b Optimize Dictionary.filter for native dictionaries 2022-06-02 16:07:44 -07:00
Ben Barham
65ed78d3e7 Merge branch 'main' into manually-merge-main 2022-06-02 10:14:57 -07:00
Alex Hoppen
4aa2bbbf06 Revert "Merge pull request #42447 from al45tair/eng/PR-90776105"
This reverts commit 8bcb71140f, reversing
changes made to c4dd271d36.
2022-06-02 18:03:23 +02:00
swift-ci
9a0978a5a2 Merge pull request #59200 from glessard/se-unaligned-loads-docs
[docs] fix a parameter description for storeBytes
2022-06-01 13:19:06 -07:00
Alastair Houghton
8bcb71140f Merge pull request #42447 from al45tair/eng/PR-90776105
[Build][Runtime] Add a new threading library.
2022-06-01 12:57:23 -07:00
Guillaume Lessard
0895934303 [docs] fix a parameter description for storeBytes 2022-06-01 09:04:43 -06:00
swift-ci
5deeaf14dc Merge remote-tracking branch 'origin/main' into rebranch 2022-06-01 03:33:57 -07:00
Daniel Duan
c368d73b5b [stdlib] Delete unused gyb variable (#59197)
This variable is no longer referenced anywhere.
2022-06-01 03:15:15 -07:00
swift-ci
d44f0650cb Merge remote-tracking branch 'origin/main' into rebranch 2022-05-31 17:33:55 -07:00
Guillaume Lessard
11138424a7 [docs] clarify docs for load, loadUnaligned and storeBytes
- outdated and incorrect information removed
2022-05-31 15:55:09 -06:00
Alastair Houghton
68dfde2405 [Build] Fix some issues with the standalone library build.
When we're building static libraries, we don't need to include the
threading objects in both Concurrency and Core, and we also don't need
two copies of the threading library's fatal error handler.

rdar://90776105
2022-05-31 16:08:20 +01:00
William Entriken
81b0d3a27f Correct complexity statement for Sequence compactMap 2022-05-28 14:59:46 -04:00
Guillaume Lessard
d6165cd83d [doc] mention loadUnaligned in URBP description 2022-05-26 14:09:00 -06:00
Alastair Houghton
848b6b53f0 [Runtime][Windows] Need to link with Synchronization.lib.
We're using some functions from Synchronization.lib now, after the
threading changes.

rdar://90776105
2022-05-24 14:57:40 +01:00
Alastair Houghton
63a09007a1 [Threading] Create new threading library and use it.
Moved all the threading code to one place.  Added explicit support for
Darwin, Linux, Pthreads, C11 threads and Win32 threads, including new
implementations of Once for Linux, Pthreads, C11 and Win32.

rdar://90776105
2022-05-24 14:57:39 +01:00
swift-ci
7a6fa5b0a5 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-19 14:14:19 -07:00
Karoy Lorentey
95dff4d55b [stdlib] Define version 5.8 of the stdlib 2022-05-18 13:55:32 -07:00
swift-ci
35563fca45 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-18 11:13:44 -07:00
Karoy Lorentey
07ffddebae Merge pull request #58954 from lorentey/string-bincompat-workarounds
[stdlib] Work around binary compatibility issues with String index validation fixes in 5.7
2022-05-18 11:09:44 -07:00
swift-ci
d62f2b0757 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-17 20:13:36 -07:00
Karoy Lorentey
50c2399a94 [stdlib] Work around binary compatibility issues with String index validation fixes in 5.7
Swift 5.7 added stronger index validation for `String`, so some illegal cases that previously triggered inconsistently diagnosed out of bounds accesses now result in reliable runtime errors. Similarly, attempts at applying an index originally vended by a UTF-8 string on a UTF-16 string now result in a reliable runtime error.

As is usually the case, new traps to the stdlib exposes code that contains previously undiagnosed / unreliably diagnosed coding issues.

Allow invalid code in binaries built with earlier versions of the stdlib to continue running with the 5.7 library by disabling some of the new traps based on the version of Swift the binary was built with.

In the case of an index encoding mismatch, allow transcoding of string storage regardless of the direction of the mismatch. (Previously we only allowed transcoding a UTF-8 string to UTF-16.)

rdar://93379333
2022-05-17 19:25:10 -07:00
David Smith
9dd8d3ad1a Actually slice things in _StringGutsSlice 2022-05-17 14:31:11 -07:00
swift-ci
593cc04070 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-15 13:33:55 -07:00
유재호(예거)
2f30304375 [stdlib] Add missing terminating quotation character in examples (#58927) 2022-05-15 13:32:22 -07:00
swift-ci
d1160b6764 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-14 11:53:25 -07:00
Ole Begemann
46c472f408 Reintroduce intentional typo in Unicode doc comment
This reintroduces an intentionally misspelled word in a doc comment for the `Unicode.Scalar.Properties.nameAlias` property. This "typo" was accidentally "fixed" in be13b470aa.
2022-05-13 22:23:17 +02:00
Alex Martini
950b7160c2 Correct the expected output in an example. 2022-05-12 10:35:55 -07:00
swift-ci
9f25a30e82 Merge remote-tracking branch 'origin/main' into rebranch 2022-05-11 15:21:21 -07:00
swift-ci
a62349a998 Merge pull request #58619 from Jager-yoo/revise-result-doc
[stdlib] Revise: applied trailing closure syntax to some examples in Result.swift
2022-05-11 14:15:27 -07:00
Jager-yoo
60dc7cda12 Revise: applied trailing closure syntax to some examples
- For clearer closure style with shorthand argument names.
2022-05-12 02:58:05 +09:00
Karoy Lorentey
063c8456a1 [stdlib] Take out primary associated types on LazySequenceProtocol/LazyCollectionProtocol for now 2022-05-09 18:09:21 -07:00
Karoy Lorentey
655f085c87 [stdlib] LazySequenceProtocol: Take out duplicate where clause 2022-05-09 18:07:10 -07:00
Karoy Lorentey
9f177d1243 Update stdlib/public/core/Codable.swift
Co-authored-by: Ben Rimmington <me@benrimmington.com>
2022-05-09 18:07:09 -07:00
Karoy Lorentey
191eaaddfd [stdlib] Don’t mark Key as primary on Keyed*ContainerProtocol 2022-05-09 18:07:09 -07:00
Karoy Lorentey
7a7ebd8970 [stdlib] Adopt primary associated types in the stdlib 2022-05-09 18:06:17 -07:00
swift-ci
5c73c3ca0a Merge remote-tracking branch 'origin/main' into rebranch 2022-05-05 19:43:52 -07:00