Skip to content

Commit 1584d93

Browse files
authored
Merge pull request #2481 from swiftwasm/main
[pull] swiftwasm from main
2 parents cd4260e + e930b2b commit 1584d93

File tree

61 files changed

+939
-1053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+939
-1053
lines changed

CHANGELOG.md

Lines changed: 254 additions & 254 deletions
Large diffs are not rendered by default.

docs/Branches.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Note that these branches come not from the "development" branches (above), but t
3333
| ----------- | -----------------
3434
| next | swift/next
3535

36-
`swift/next` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's master branch are automatically merged in. Why isn't this just `swift/main`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
36+
`swift/next` is a branch for LLVM that includes all changes necessary to support Swift. Changes from llvm.org's main branch are automatically merged in. Why isn't this just `swift/main`? Well, because LLVM changes *very* rapidly, and that wouldn't be very stable. However, we do want to make sure the Swift stuff keeps working.
3737

3838
If you are making changes to LLVM to support Swift, you'll probably need to work on them in `swift/main` to test them against Swift itself, but they should be committed to `swift/next`, and cherry-picked to the current release branch (`swift/release/x.y`) if needed. Remember, the release branches are automerged into `swift/main` on a regular basis.
3939

@@ -60,9 +60,9 @@ You can use any of the branch names as the argument to `--scheme`, such as `main
6060

6161
1) LLVM Project changes that don't depend on Swift
6262

63-
- New commits go to `master` in the upstream [llvm-project](https://github.com/llvm/llvm-project).
63+
- New commits go to `main` in the upstream [llvm-project](https://github.com/llvm/llvm-project).
6464

65-
- Then cherry-pick these commits to an appropriate, `swift/main` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see [Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/master/apple-docs/AppleBranchingScheme.md) document to determine which `apple/stable/*` branch you should cherry-pick to.
65+
- Then cherry-pick these commits to an appropriate, `swift/main` aligned `apple/stable/*` branch in Apple's fork of [llvm-project](https://github.com/apple/llvm-project). Please see [Apple's branching scheme](https://github.com/apple/llvm-project/blob/apple/main/apple-docs/AppleBranchingScheme.md) document to determine which `apple/stable/*` branch you should cherry-pick to.
6666

6767
Note that **no new changes should be submitted directly to `apple/main`**. We are actively working on eliminating the differences from upstream LLVM.
6868

@@ -84,5 +84,5 @@ Some branches are *automerged* into other branches, to keep them in sync. This i
8484

8585
### LLVM Project
8686
- `swift/release/x.y` (the *latest* release branch) is automerged into `swift/main`
87-
- llvm.org's `master` is automerged into `swift/next`
87+
- llvm.org's `main` is automerged into `swift/next`
8888
- llvm.org's release branch *may* be automerged into `swift/release/x.y`, if they are in sync

docs/CppInteroperabilityManifesto.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ func caller() {
274274
To understand the constraints that Swift puts on `inout` parameters, let's take
275275
a look at the mental model for introduced in the [Ownership
276276
manifesto](OwnershipManifesto.md) and in [SE-0176 Enforce Exclusive Access to
277-
Memory](https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md).
277+
Memory](https://github.com/apple/swift-evolution/blob/main/proposals/0176-enforce-exclusive-access-to-memory.md).
278278
When the caller binds a storage reference to an `inout` parameter, it starts a
279279
non-instantaneous access to the whole value that occupies the storage. This
280280
access ends when the callee returns. Overlapping accesses are not allowed, and
@@ -1804,7 +1804,7 @@ dynamically, some are undefined behavior.
18041804

18051805
The backdoors are disallowed by the exclusivity rule (from [SE-0176 Enforce
18061806
Exclusive Access to
1807-
Memory](https://github.com/apple/swift-evolution/blob/master/proposals/0176-enforce-exclusive-access-to-memory.md)):
1807+
Memory](https://github.com/apple/swift-evolution/blob/main/proposals/0176-enforce-exclusive-access-to-memory.md)):
18081808

18091809
> two accesses to the same variable are not allowed to overlap unless both
18101810
> accesses are reads
@@ -2875,7 +2875,7 @@ struct MyCxxCollection {
28752875

28762876
Swift has an equivalent for C++'s `operator()`: `callAsFunction` (introduced in
28772877
[SE-0253: Callable values of user-defined nominal
2878-
types](https://github.com/apple/swift-evolution/blob/master/proposals/0253-callable.md)).
2878+
types](https://github.com/apple/swift-evolution/blob/main/proposals/0253-callable.md)).
28792879

28802880
```c++
28812881
// C++ header.
@@ -2922,7 +2922,7 @@ non-throwing Swift functions. If a C++ function called from Swift throws an
29222922
exception that is not caught within the C++ code, the program will terminate.
29232923

29242924
This approach is similar to that taken by the [Python interop
2925-
library](https://github.com/pvieito/PythonKit/blob/master/PythonKit/Python.swift),
2925+
library](https://github.com/pvieito/PythonKit/blob/main/PythonKit/Python.swift),
29262926
which also terminates the program by default if a Python exception is raised and
29272927
not caught within the Python code.
29282928

@@ -3470,7 +3470,7 @@ A sidecar annotation file allows to add arbitrary attributes to declarations
34703470
parsed from a header file. You can find examples of such files in the [apinotes
34713471
directory](../apinotes). APINotes files
34723472
are handled by the [APINotes library in
3473-
Clang](https://github.com/apple/llvm-project/tree/apple/master/clang/lib/APINotes).
3473+
Clang](https://github.com/apple/llvm-project/tree/apple/main/clang/lib/APINotes).
34743474
Clang reads an APINotes file alongside the header file; Clang injects attributes
34753475
specified by APINotes into the AST parsed from the header.
34763476

docs/DebuggingTheCompiler.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,19 +607,19 @@ missing important content from the downstream branch. As an example,
607607
consider a situation where one has the following straw man commit flow
608608
graph:
609609

610-
github/master -> github/tensorflow
610+
github/main -> github/tensorflow
611611

612612
In this case if one attempts to use `git-bisect` on
613613
github/tensorflow, `git-bisect` will sometimes choose commits from
614-
github/master resulting in one being unable to compile/test specific
614+
github/main resulting in one being unable to compile/test specific
615615
tensorflow code that has not been upstreamed yet. Even worse, what if
616616
we are trying to bisect in between two that were branched from
617617
github/tensorflow and have had subsequent commits cherry-picked on
618618
top. Without any loss of generality, lets call those two tags
619619
`tag-tensorflow-bad` and `tag-tensorflow-good`. Since both of
620620
these tags have had commits cherry-picked on top, they are technically
621621
not even on the github/tensorflow branch, but rather in a certain
622-
sense are a tag of a feature branch from master/tensorflow. So,
622+
sense are a tag of a feature branch from main/tensorflow. So,
623623
`git-bisect` doesn't even have a clear history to bisect on in
624624
multiple ways.
625625

@@ -634,14 +634,14 @@ commits. We can compute this as so:
634634

635635
Given that both tags were taken from the feature branch, the reader
636636
can prove to themselves that this commit is guaranteed to be on
637-
`github/tensorflow` and not `github/master` since all commits from
638-
`github/master` are forwarded using git merges.
637+
`github/tensorflow` and not `github/main` since all commits from
638+
`github/main` are forwarded using git merges.
639639

640640
Then lets assume that we checked out `$TAG_MERGE_BASE` and then ran
641641
`test.sh` and did not hit any error. Ok, we can not bisect. Sadly,
642642
as mentioned above if we run git-bisect in between `$TAG_MERGE_BASE`
643643
and `tags/tag-tensorflow-bad`, `git-bisect` will sometimes choose
644-
commits from `github/master` which would cause `test.sh` to fail
644+
commits from `github/main` which would cause `test.sh` to fail
645645
if we are testing tensorflow specific code! To work around this
646646
problem, we need to start our bisect and then tell `git-bisect` to
647647
ignore those commits by using the skip sub command:

docs/DifferentiableProgramming.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ the complex number type defined in the
18871887
differentiable.
18881888
[The full implementation is here](https://github.com/tensorflow/swift-apis/blob/main/Sources/third_party/Experimental/Complex.swift).
18891889
The implementation adopts the
1890-
[Autograd convention](https://github.com/HIPS/autograd/blob/master/docs/tutorial.md#complex-numbers)
1890+
[Autograd convention](https://github.com/HIPS/autograd/blob/main/docs/tutorial.md#complex-numbers)
18911891
for derivatives of functions with complex arguments or results, so that we can
18921892
define derivatives for non-holomorphic primitives.
18931893

@@ -2106,7 +2106,7 @@ func foo<T: Differentiable, U, V: Differentiable>(
21062106
##### Examples
21072107

21082108
The `ElementaryFunctions` protocol introduced in
2109-
[SE-0246](https://github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md)
2109+
[SE-0246](https://github.com/apple/swift-evolution/blob/main/proposals/0246-mathable.md)
21102110
defines generic elementary functions, which are non-linear. By defining
21112111
derivatives using the `@derivative` attribute for these protocol
21122112
requirements in an extension, all conforming types now have differentiable
@@ -3202,7 +3202,7 @@ Parker Schuh, and Dimitrios Vytiniotis.
32023202
[Bart Chrzaszcz]: https://github.com/bartchr808
32033203

32043204
[swift-numerics]: https://github.com/apple/swift-numerics
3205-
[SE-0229]: https://github.com/apple/swift-evolution/blob/master/proposals/0229-simd.md
3206-
[SE-0233]: https://github.com/apple/swift-evolution/blob/master/proposals/0233-additive-arithmetic-protocol.md
3207-
[SE-0246]: https://github.com/apple/swift-evolution/blob/master/proposals/0246-mathable.md
3208-
[SE-0251]: https://github.com/apple/swift-evolution/blob/master/proposals/0251-simd-additions.md
3205+
[SE-0229]: https://github.com/apple/swift-evolution/blob/main/proposals/0229-simd.md
3206+
[SE-0233]: https://github.com/apple/swift-evolution/blob/main/proposals/0233-additive-arithmetic-protocol.md
3207+
[SE-0246]: https://github.com/apple/swift-evolution/blob/main/proposals/0246-mathable.md
3208+
[SE-0251]: https://github.com/apple/swift-evolution/blob/main/proposals/0251-simd-additions.md

docs/GenericsManifesto.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are a number of restrictions to the use of generics that fall out of the i
2727

2828
### Recursive protocol constraints (*)
2929

30-
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/master/proposals/0157-recursive-protocol-constraints.md) and is tracked by [SR-1445](https://bugs.swift.org/browse/SR-1445).*
30+
*This feature has been accepted in [SE-0157](https://github.com/apple/swift-evolution/blob/main/proposals/0157-recursive-protocol-constraints.md) and is tracked by [SR-1445](https://bugs.swift.org/browse/SR-1445).*
3131

3232
Currently, an associated type cannot be required to conform to its enclosing protocol (or any protocol that inherits that protocol). For example, in the standard library `SubSequence` type of a `Sequence` should itself be a `Sequence`:
3333

@@ -77,7 +77,7 @@ There are a number of Swift declarations that currently cannot have generic para
7777

7878
### Generic typealiases
7979

80-
*This feature has been accepted in [SE-0048](https://github.com/apple/swift-evolution/blob/master/proposals/0048-generic-typealias.md) and was released with Swift 3.*
80+
*This feature has been accepted in [SE-0048](https://github.com/apple/swift-evolution/blob/main/proposals/0048-generic-typealias.md) and was released with Swift 3.*
8181

8282
Typealiases could be allowed to carry generic parameters. They would still be aliases (i.e., they would not introduce new types). For example:
8383

@@ -114,7 +114,7 @@ Note: generic associatedtypes address many use cases also addressed by higher-ki
114114

115115
### Generic subscripts
116116

117-
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/master/proposals/0148-generic-subscripts.md), was tracked by [SR-115](https://bugs.swift.org/browse/SR-115) and was released with Swift 4.*
117+
*This feature has been accepted in [SE-0148](https://github.com/apple/swift-evolution/blob/main/proposals/0148-generic-subscripts.md), was tracked by [SR-115](https://bugs.swift.org/browse/SR-115) and was released with Swift 4.*
118118

119119
Subscripts could be allowed to have generic parameters. For example, we could introduce a generic subscript on a `Collection` that allows us to pull out the values at an arbitrary set of indices:
120120

@@ -210,7 +210,7 @@ There are a number of minor extensions we can make to the generics system that d
210210

211211
### Arbitrary requirements in protocols (*)
212212

213-
*This feature has been accepted in [SE-0142](https://github.com/apple/swift-evolution/blob/master/proposals/0142-associated-types-constraints.md) and was released with Swift 4.*
213+
*This feature has been accepted in [SE-0142](https://github.com/apple/swift-evolution/blob/main/proposals/0142-associated-types-constraints.md) and was released with Swift 4.*
214214

215215
Currently, a new protocol can inherit from other protocols, introduce new associated types, and add new conformance constraints to associated types (by redeclaring an associated type from an inherited protocol). However, one cannot express more general constraints. Building on the example from "Recursive protocol constraints", we really want the element type of a `Sequence`'s `SubSequence` to be the same as the element type of the `Sequence`, e.g.,
216216

@@ -226,7 +226,7 @@ Hanging the `where` clause off the associated type protocol is not ideal, but th
226226

227227
### Typealiases in protocols and protocol extensions (*)
228228

229-
*This feature has been accepted in [SE-0092](https://github.com/apple/swift-evolution/blob/master/proposals/0092-typealiases-in-protocols.md) and was released with Swift 3.*
229+
*This feature has been accepted in [SE-0092](https://github.com/apple/swift-evolution/blob/main/proposals/0092-typealiases-in-protocols.md) and was released with Swift 3.*
230230

231231
Now that associated types have their own keyword (thanks!), it's reasonable to bring back `typealias`. Again with the `Sequence` protocol:
232232

@@ -253,7 +253,7 @@ var p3: Promise = getRandomPromise() // p3 has type Promise<Int, Error> due to t
253253

254254
### Generalized `class` constraints
255255

256-
*This feature is a consequence of proposal [SE-0156](https://github.com/apple/swift-evolution/blob/master/proposals/0156-subclass-existentials.md) and was released with Swift 4.*
256+
*This feature is a consequence of proposal [SE-0156](https://github.com/apple/swift-evolution/blob/main/proposals/0156-subclass-existentials.md) and was released with Swift 4.*
257257

258258
The `class` constraint can currently only be used for defining protocols. We could generalize it to associated type and type parameter declarations, e.g.,
259259

@@ -322,7 +322,7 @@ Unlike the minor extensions, major extensions to the generics model provide more
322322

323323
### Conditional conformances (*)
324324

325-
*This feature has been accepted in [SE-0143](https://github.com/apple/swift-evolution/blob/master/proposals/0143-conditional-conformances.md) and is implemented in Swift 4.2.*
325+
*This feature has been accepted in [SE-0143](https://github.com/apple/swift-evolution/blob/main/proposals/0143-conditional-conformances.md) and is implemented in Swift 4.2.*
326326

327327
Conditional conformances express the notion that a generic type will conform to a particular protocol only under certain circumstances. For example, `Array` is `Equatable` only when its elements are `Equatable`:
328328

@@ -496,7 +496,7 @@ extension Bag {
496496

497497
### Moving the `where` clause outside of the angle brackets (*)
498498

499-
*Accepted in [SE-0081](https://github.com/apple/swift-evolution/blob/master/proposals/0081-move-where-expression.md) and implemented in Swift 3.*
499+
*Accepted in [SE-0081](https://github.com/apple/swift-evolution/blob/main/proposals/0081-move-where-expression.md) and implemented in Swift 3.*
500500

501501
The `where` clause of generic functions comes very early in the declaration, although it is generally of much less concern to the client than the function parameters and result type that follow it. This is one of the things that contributes to "angle bracket blindness". For example, consider the `containsAll` signature above:
502502

@@ -513,7 +513,7 @@ func containsAll<S: Sequence>(elements: S) -> Bool
513513

514514
### Renaming `protocol<...>` to `Any<...>` (*)
515515

516-
*Accepted in [SE-0095](https://github.com/apple/swift-evolution/blob/master/proposals/0095-any-as-existential.md) as "Replace `protocol<P1,P2>` syntax with `P1 & P2` syntax" and implemented in Swift 3.*
516+
*Accepted in [SE-0095](https://github.com/apple/swift-evolution/blob/main/proposals/0095-any-as-existential.md) as "Replace `protocol<P1,P2>` syntax with `P1 & P2` syntax" and implemented in Swift 3.*
517517

518518
The `protocol<...>` syntax is a bit of an oddity in Swift. It is used to compose protocols together, mostly to create values of existential type, e.g.,
519519

@@ -730,7 +730,7 @@ The generics system doesn't seem like a good candidate for a reduction in scope;
730730

731731
### Associated type inference
732732

733-
*[SE-0108](https://github.com/apple/swift-evolution/blob/master/proposals/0108-remove-assoctype-inference.md), a proposal to remove this feature, was rejected.*
733+
*[SE-0108](https://github.com/apple/swift-evolution/blob/main/proposals/0108-remove-assoctype-inference.md), a proposal to remove this feature, was rejected.*
734734

735735
Associated type inference is the process by which we infer the type bindings for associated types from other requirements. For example:
736736

docs/HowSwiftImportsCAPIs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ Swift enums.
958958

959959
The concept of open enums was added in Swift 5 ([SE-0192 Handling Future
960960
Enum
961-
Cases](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md)),
961+
Cases](https://github.com/apple/swift-evolution/blob/main/proposals/0192-non-exhaustive-enums.md)),
962962
but that proposal did not change the importing strategy of non-annotated C
963963
enums, in part because of source compatibility concerns. It might be still
964964
possible to change C enums to be imported as open Swift enums, but as the time

docs/LibraryEvolution.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Library evolution was formally described in `SE-0260 <SE0260_>`_, but this
2929
document should be kept up to date as new features are added to the language.
3030

3131
.. _library evolution: https://swift.org/blog/abi-stability-and-more/
32-
.. _SE0260: https://github.com/apple/swift-evolution/blob/master/proposals/0260-library-evolution.md
32+
.. _SE0260: https://github.com/apple/swift-evolution/blob/main/proposals/0260-library-evolution.md
3333

3434
.. contents:: :local:
3535

@@ -108,7 +108,7 @@ with a single app target are not forced to think about access control, anyone
108108
writing a bundled library should (ideally) not be required to use any of the
109109
annotations described below in order to achieve full performance.
110110

111-
.. _SE0193: https://github.com/apple/swift-evolution/blob/master/proposals/0193-cross-module-inlining-and-specialization.md
111+
.. _SE0193: https://github.com/apple/swift-evolution/blob/main/proposals/0193-cross-module-inlining-and-specialization.md
112112
.. _Swift Package Manager: https://swift.org/package-manager/
113113

114114
.. note::
@@ -210,7 +210,7 @@ any future use of the function must take this into account.
210210
Although they are not a supported feature for arbitrary libraries at this time,
211211
public `transparent`_ functions are implicitly marked ``@inlinable``.
212212

213-
.. _transparent: https://github.com/apple/swift/blob/master/docs/TransparentAttr.md
213+
.. _transparent: https://github.com/apple/swift/blob/main/docs/TransparentAttr.md
214214

215215

216216
Restrictions on Inlinable Functions

docs/LibraryEvolutionManifesto.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Both of these annotations are things the compiler already knows when a type is d
122122

123123
The compiler actually has basic support for frozen classes, which allow stored properties to be accessed directly by offset from the class reference. There's no real reason why this can't be supported more generally, but confusion around *what's* being frozen and the rarity of wanting to make this promise anyway kept it out of [SE-0260][].
124124

125-
[SE-0260]: https://github.com/apple/swift-evolution/blob/master/proposals/0260-library-evolution.md
125+
[SE-0260]: https://github.com/apple/swift-evolution/blob/main/proposals/0260-library-evolution.md
126126

127127

128128
# Generalized Availability Model

0 commit comments

Comments
 (0)