Skip to content

Commit 47a23ff

Browse files
Merge pull request #5250 from swiftwasm/katei/merge-main-2023-02-03
Merge main 2023-02-03
2 parents 1f7fb77 + f3a69d4 commit 47a23ff

File tree

555 files changed

+18628
-7678
lines changed

Some content is hidden

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

555 files changed

+18628
-7678
lines changed

.github/CODEOWNERS

Lines changed: 154 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -2,147 +2,167 @@
22
# Each line is a case-sensitive file pattern followed by one or more owners.
33
# Order is important. The last matching pattern has the most precedence.
44
# More information: https://docs.github.com/en/articles/about-code-owners
5+
#
6+
# Please mirror the repository's file hierarchy in case-sensitive lexicographic
7+
# order.
8+
9+
# TODO: /.clang-format
10+
# TODO: /.dir-locals.el
11+
# TODO: /.flake8
12+
# TODO: /.gitattributes
513

614
# .github
7-
/.github/ @shahmishal
8-
/.github/CODEOWNERS @AnthonyLatsis @shahmishal
9-
/.github/ISSUE_TEMPLATE/ @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
10-
/.github/PULL_REQUEST_TEMPLATE.md @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
15+
/.github/ @shahmishal
16+
/.github/CODEOWNERS @AnthonyLatsis @shahmishal
17+
/.github/ISSUE_TEMPLATE/ @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
18+
/.github/PULL_REQUEST_TEMPLATE.md @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
1119

12-
# docs
13-
/docs/HowToGuides/ @AnthonyLatsis @LucianoPAlmeida @xedin
14-
/docs/Generics/ @slavapestov
15-
/docs/Generics.rst @slavapestov
20+
# TODO: /.gitignore
21+
# TODO: /.mailmap
22+
# TODO: /Brewfile
23+
# TODO: /CHANGELOG.md
24+
# TODO: /CMakeLists.txt
25+
# TODO: /CODE_OF_CONDUCT.md
26+
# TODO: /CODE_OWNERS.TXT
27+
# TODO: /CONTRIBUTING.md
28+
# TODO: /LICENSE.txt
29+
# TODO: /README.md
1630

17-
# Standard Library
18-
# TODO: /stdlib/
19-
/stdlib/public/Cxx/ @zoecarver @hyp @egorzhdan
20-
/stdlib/public/Distributed/ @ktoso
21-
/stdlib/public/Windows/ @compnerd
22-
# TODO: /*test/stdlib/
23-
# TODO: /unittests/stdlib/
31+
# SwiftCompilerSources
32+
/SwiftCompilerSources @eeckstein
2433

25-
# ASTGen
26-
/lib/ASTGen/ @zoecarver @CodaFi
27-
/test/ASTGen/ @zoecarver @CodaFi
28-
29-
# Dependency scanning
30-
include/swift/DependencyScan @artemcm
31-
lib/DependencyScan @artemcm
32-
lib/Frontend/ModuleInterfaceLoader.cpp @artemcm
33-
lib/Serialization/SerializedModuleLoader.cpp @artemcm
34-
test/ScanDependencies @artemcm
35-
36-
# Driver
37-
include/swift/Driver @artemcm
38-
lib/Driver @artemcm
39-
test/Driver @artemcm
40-
41-
# Owners of the parser
42-
/include/swift/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
43-
/lib/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
44-
/*test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
45-
/unittests/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
46-
47-
SwiftCompilerSources @eeckstein
48-
49-
# C++ Interop
50-
include/swift/ClangImporter @zoecarver @hyp @egorzhdan
51-
include/swift/PrintAsClang @zoecarver @hyp @egorzhdan
52-
lib/ClangImporter @zoecarver @hyp @egorzhdan
53-
lib/PrintAsClang @zoecarver @hyp @egorzhdan
54-
test/Interop @zoecarver @hyp @egorzhdan
55-
56-
# Threading implementation
57-
include/swift/Threading @al45tair
58-
lib/Threading @al45tair
59-
60-
# Windows support
61-
cmake/**/*Windows* @compnerd
62-
lib/Basic/Windows @compnerd
63-
utils/*windows* @compnerd
64-
65-
# Repository checkout utils
66-
67-
/utils/update_checkout/ @shahmishal
68-
/utils/update-checkout* @shahmishal
69-
70-
71-
# AST
72-
/include/swift/AST/ @hborla @slavapestov @xedin
73-
/include/swift/AST/*Conformance* @slavapestov
74-
/include/swift/AST/*Distributed* @ktoso
75-
/include/swift/AST/Evaluator* @CodaFi @slavapestov
76-
/include/swift/AST/*Generic* @hborla @slavapestov
77-
/include/swift/AST/*Protocol* @hborla @slavapestov
78-
/include/swift/AST/*Requirement* @hborla @slavapestov
79-
/include/swift/AST/*Substitution* @slavapestov
80-
/lib/AST/ @hborla @slavapestov @xedin
81-
/lib/AST/*Conformance* @slavapestov
82-
/lib/AST/Evaluator* @CodaFi @slavapestov
83-
/lib/AST/*Generic* @hborla @slavapestov
84-
/lib/AST/ModuleLoader.cpp @artemcm
85-
/lib/AST/*Requirement* @hborla @slavapestov
86-
/lib/AST/RequirementMachine/ @slavapestov
87-
/lib/AST/*Substitution @slavapestov
88-
/unittests/AST/ @hborla @slavapestov @xedin
89-
/unittests/AST/*Evaluator* @CodaFi @slavapestov
90-
91-
# Sema
92-
/include/swift/Sema/ @hborla @slavapestov @xedin
93-
/include/swift/Sema/Constraint* @hborla @xedin
94-
/include/swift/Sema/CS* @hborla @xedin
95-
/lib/Sema/ @hborla @slavapestov @xedin
96-
/lib/Sema/Constraint* @hborla @xedin
97-
/lib/Sema/CS* @hborla @xedin
98-
/lib/Sema/CodeSynthesisDistributed* @hborla @ktoso
99-
/lib/Sema/DerivedConformance* @slavapestov
100-
/lib/Sema/DerivedConformanceDistributed* @ktoso @slavapestov
101-
/lib/Sema/TypeCheckDistributed* @hborla @ktoso @xedin
102-
/lib/Sema/TypeCheckType* @AnthonyLatsis @hborla @slavapestov @xedin
103-
/lib/Sema/TypeCheckProtocol* @AnthonyLatsis @hborla @slavapestov
104-
/test/Constraints/ @hborla @xedin
105-
/test/decl/ @hborla @slavapestov
106-
/test/decl/protocol/ @AnthonyLatsis @hborla @slavapestov
107-
# FIXME: This file could have a dedicated directory.
108-
/test/decl/protocol/special/DistributedActor.swift @ktoso
109-
# FIXME: Should there be a 'Sema' folder under 'Distributed'? Or perhaps it
110-
# should be the other way around, i.e 'Sema/Distributed', 'SILGen/Distributed',
111-
# etc.?
112-
/test/Distributed/* @ktoso
113-
# FIXME: Is there a better way to structure this high-level 'Inputs' dir.? We
114-
# want only the Sema bits here.
115-
/test/Distributed/Inputs/ @ktoso
116-
/test/expr/ @hborla @slavapestov @xedin
117-
/test/Generics/ @hborla @slavapestov
118-
/test/Sema/ @hborla @slavapestov @xedin
119-
/test/stmt/ @hborla @xedin
120-
/test/type/ @hborla @slavapestov @xedin
121-
/validation-test/Sema/ @hborla @slavapestov @xedin
122-
/unittests/Sema/ @hborla @xedin
123-
124-
# SIL/SILGen
125-
# TODO: /include/swift/SIL/
126-
# TODO: /lib/SIL/
127-
# TODO: /lib/SILGen/
128-
/lib/SILGen/*Distributed* @ktoso
129-
/test/Distributed/SIL/ @ktoso
130-
# TODO: /*test/SIL/
131-
# TODO: /*test/SILGen/
132-
# TODO: /unittests/SIL/
34+
# apinotes
35+
# TODO: /apinotes
13336

134-
# SILOptimizer
135-
# TODO: /include/swift/SILOptimizer/
136-
/include/swift/SILOptimizer/Utils/Distributed* @ktoso
137-
# TODO: /lib/SILOptimizer/
138-
/lib/SILOptimizer/Utils/Distributed* @ktoso
139-
# TODO: /*test/SILOptimizer/
37+
# benchmark
38+
# TODO: /benchmark
39+
40+
# bindings
41+
# TODO: /bindings
14042

141-
# IRGen
43+
# cmake
44+
/cmake/**/*Windows* @compnerd
45+
46+
# docs
47+
/docs/Generics.rst @slavapestov
48+
/docs/Generics/ @slavapestov
49+
/docs/HowToGuides/ @AnthonyLatsis @LucianoPAlmeida @xedin
50+
51+
# include
52+
/include/swift/AST/ @hborla @slavapestov @xedin
53+
/include/swift/AST/*Conformance* @slavapestov
54+
/include/swift/AST/*Distributed* @ktoso
55+
/include/swift/AST/*Generic* @hborla @slavapestov
56+
/include/swift/AST/*Protocol* @hborla @slavapestov
57+
/include/swift/AST/*Requirement* @hborla @slavapestov
58+
/include/swift/AST/*Substitution* @slavapestov
59+
/include/swift/AST/Evaluator* @CodaFi @slavapestov
60+
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan
61+
/include/swift/DependencyScan @artemcm
62+
/include/swift/Driver @artemcm
14263
# TODO: /include/swift/IRGen/
64+
/include/swift/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
65+
/include/swift/PrintAsClang @zoecarver @hyp @egorzhdan
66+
# TODO: /include/swift/SIL/
67+
# TODO: /include/swift/SILOptimizer/
68+
/include/swift/SILOptimizer/Utils/Distributed* @ktoso
69+
/include/swift/Sema/ @hborla @slavapestov @xedin
70+
/include/swift/Sema/CS* @hborla @xedin
71+
/include/swift/Sema/Constraint* @hborla @xedin
72+
/include/swift/Threading @al45tair
73+
74+
# lib
75+
/lib/AST/ @hborla @slavapestov @xedin
76+
/lib/AST/*Conformance* @slavapestov
77+
/lib/AST/*Generic* @hborla @slavapestov
78+
/lib/AST/*Requirement* @hborla @slavapestov
79+
/lib/AST/*Substitution @slavapestov
80+
/lib/AST/Evaluator* @CodaFi @slavapestov
81+
/lib/AST/ModuleLoader.cpp @artemcm
82+
/lib/AST/RequirementMachine/ @slavapestov
83+
/lib/ASTGen/ @zoecarver @CodaFi
84+
/lib/Basic/Windows @compnerd
85+
/lib/ClangImporter @zoecarver @hyp @egorzhdan
86+
/lib/DependencyScan @artemcm
87+
/lib/Driver @artemcm
88+
/lib/Frontend/ModuleInterfaceLoader.cpp @artemcm
14389
# TODO: /lib/IRGen/
144-
/lib/IRGen/*Distributed* @ktoso
145-
# TODO: /*test/IRGen/
90+
/lib/IRGen/*Distributed* @ktoso
91+
/lib/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
92+
/lib/PrintAsClang @zoecarver @hyp @egorzhdan
93+
# TODO: /lib/SIL/
94+
# TODO: /lib/SILGen/
95+
/lib/SILGen/*Distributed* @ktoso
96+
# TODO: /lib/SILOptimizer/
97+
/lib/SILOptimizer/Utils/Distributed* @ktoso
98+
/lib/Sema/ @hborla @slavapestov @xedin
99+
/lib/Sema/CS* @hborla @xedin
100+
/lib/Sema/CodeSynthesisDistributed* @hborla @ktoso
101+
/lib/Sema/Constraint* @hborla @xedin
102+
/lib/Sema/DerivedConformance* @slavapestov
103+
/lib/Sema/DerivedConformanceDistributed* @ktoso @slavapestov
104+
/lib/Sema/TypeCheckDistributed* @hborla @ktoso @xedin
105+
/lib/Sema/TypeCheckProtocol* @AnthonyLatsis @hborla @slavapestov
106+
/lib/Sema/TypeCheckType* @AnthonyLatsis @hborla @slavapestov @xedin
107+
/lib/Serialization/SerializedModuleLoader.cpp @artemcm
108+
/lib/Threading @al45tair
109+
110+
# localization
111+
# TODO: /localization
112+
113+
# stdlib
114+
# TODO: /stdlib/
115+
/stdlib/public/Cxx/ @zoecarver @hyp @egorzhdan
116+
/stdlib/public/Distributed/ @ktoso
117+
/stdlib/public/Windows/ @compnerd
118+
119+
# test
120+
/test/ASTGen/ @zoecarver @CodaFi
121+
/test/Constraints/ @hborla @xedin
122+
/test/Distributed/ @ktoso
123+
/test/Driver/ @artemcm
124+
/test/Generics/ @hborla @slavapestov
125+
# TODO: /test/IRGen/
126+
/test/Interop/ @zoecarver @hyp @egorzhdan
127+
/test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
128+
# TODO: /test/SIL/
129+
# TODO: /test/SILGen/
130+
# TODO: /test/SILOptimizer/
131+
/test/ScanDependencies/ @artemcm
132+
/test/Sema/ @hborla @slavapestov @xedin
133+
/test/decl/ @hborla @slavapestov
134+
/test/decl/protocol/ @AnthonyLatsis @hborla @slavapestov
135+
# FIXME: This file could have a dedicated directory.
136+
/test/decl/protocol/special/DistributedActor.swift @ktoso
137+
/test/expr/ @hborla @slavapestov @xedin
138+
# TODO: /test/stdlib/
139+
/test/stmt/ @hborla @xedin
140+
/test/type/ @hborla @slavapestov @xedin
141+
142+
# tools
143+
# TODO: /tools
144+
145+
# unittests
146+
/unittests/AST/ @hborla @slavapestov @xedin
147+
/unittests/AST/*Evaluator* @CodaFi @slavapestov
148+
/unittests/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
149+
# TODO: /unittests/SIL/
150+
/unittests/Sema/ @hborla @xedin
151+
# TODO: /unittests/stdlib/
146152

147-
# TODO: Find a better place for this entry.
148-
/test/Distributed/Runtime @ktoso
153+
# userdocs
154+
# TODO: /userdocs
155+
156+
# utils
157+
/utils/*windows* @compnerd
158+
/utils/update-checkout* @shahmishal
159+
/utils/update_checkout/ @shahmishal
160+
161+
# validation-test
162+
# TODO: /validation-test/IRGen/
163+
/validation-test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @rintaro
164+
# TODO: /validation-test/SIL/
165+
# TODO: /validation-test/SILGen/
166+
# TODO: /validation-test/SILOptimizer/
167+
/validation-test/Sema/ @hborla @slavapestov @xedin
168+
# TODO: /validation-test/stdlib/

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ _**Note:** This is in reverse chronological order, so newer entries are added to
44

55
## Swift 5.8
66

7+
* [SE-0376][]:
8+
9+
The `@backDeployed(before:)` attribute may now be used to extend the availability of a function to OS releases prior to the introduction of that function as ABI.
10+
11+
For example, suppose that `struct Temperature` was introduced in a macOS SDK framework in macOS 12. Later in macOS 13 the framework authors decided to add a `degreesFahrenheit` property as a convenience:
12+
13+
```swift
14+
@available(macOS 12, *)
15+
public struct Temperature {
16+
public var degreesCelsius: Double
17+
18+
// ...
19+
}
20+
21+
extension Temperature {
22+
@available(macOS 12, *)
23+
@backDeployed(before: macOS 13)
24+
public var degreesFahrenheit: Double {
25+
return (degreesCelsius * 9 / 5) + 32
26+
}
27+
}
28+
```
29+
30+
Adding the `@backDeployed` attribute to `degreesFahrenheit` enables the framework author to make this new declaration available to apps with a minimum deployment target of macOS 12, even though the ABI entry point for `degreesFahrenheit` is only present in macOS 13 and up.
31+
32+
When a function with `@backDeployed` is called, the compiler wraps the invocation of the function in a thunk. The thunk checks whether the library entry point for the declaration is available at runtime, and invokes it if it is. Otherwise, a copy of the function that was emitted into the client is called instead.
33+
734
* [#56139][]:
835

936
Сollection downcasts in cast patterns are now supported. For example:
@@ -9611,6 +9638,7 @@ using the `.dynamicType` member to retrieve the type of an expression should mig
96119638
[SE-0362]: <https://github.com/apple/swift-evolution/blob/main/proposals/0362-piecemeal-future-features.md>
96129639
[SE-0365]: <https://github.com/apple/swift-evolution/blob/main/proposals/0365-implicit-self-weak-capture.md>
96139640
[SE-0370]: <https://github.com/apple/swift-evolution/blob/main/proposals/0370-pointer-family-initialization-improvements.md>
9641+
[SE-0376]: <https://github.com/apple/swift-evolution/blob/main/proposals/0376-function-back-deployment.md>
96149642

96159643
[#42697]: <https://github.com/apple/swift/issues/42697>
96169644
[#42728]: <https://github.com/apple/swift/issues/42728>

SwiftCompilerSources/Sources/Optimizer/Utilities/WalkUtils.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ extension ValueDefUseWalker {
341341
return unmatchedPath(value: operand, path: path)
342342
}
343343
case is InitExistentialRefInst, is OpenExistentialRefInst,
344-
is BeginBorrowInst, is CopyValueInst,
344+
is BeginBorrowInst, is CopyValueInst, is MoveValueInst,
345345
is UpcastInst, is UncheckedRefCastInst, is EndCOWMutationInst,
346346
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkMustCheckInst:
347347
return walkDownUses(ofValue: (instruction as! SingleValueInstruction), path: path)
@@ -618,7 +618,7 @@ extension ValueUseDefWalker {
618618
return rootDef(value: mvr, path: path)
619619
}
620620
case is InitExistentialRefInst, is OpenExistentialRefInst,
621-
is BeginBorrowInst, is CopyValueInst,
621+
is BeginBorrowInst, is CopyValueInst, is MoveValueInst,
622622
is UpcastInst, is UncheckedRefCastInst, is EndCOWMutationInst,
623623
is RefToBridgeObjectInst, is BridgeObjectToRefInst, is MarkMustCheckInst:
624624
return walkUp(value: (def as! Instruction).operands[0].value, path: path)

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,8 @@ final public class ProjectBoxInst : SingleValueInstruction, UnaryInstruction {
609609

610610
final public class CopyValueInst : SingleValueInstruction, UnaryInstruction {}
611611

612+
final public class MoveValueInst : SingleValueInstruction, UnaryInstruction {}
613+
612614
final public class StrongCopyUnownedValueInst : SingleValueInstruction, UnaryInstruction {}
613615

614616
final public class StrongCopyUnmanagedValueInst : SingleValueInstruction, UnaryInstruction {}

SwiftCompilerSources/Sources/SIL/Registration.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public func registerSILClasses() {
123123
register(BeginBorrowInst.self)
124124
register(ProjectBoxInst.self)
125125
register(CopyValueInst.self)
126+
register(MoveValueInst.self)
126127
register(EndCOWMutationInst.self)
127128
register(ClassifyBridgeObjectInst.self)
128129
register(PartialApplyInst.self)

benchmark/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ set(SWIFT_BENCH_MODULES
4545
single-source/Breadcrumbs
4646
single-source/BucketSort
4747
single-source/BufferFill
48+
single-source/BufferFind
4849
single-source/ByteSwap
4950
single-source/COWTree
5051
single-source/COWArrayGuaranteedParameterOverhead
@@ -202,6 +203,7 @@ set(SWIFT_BENCH_MODULES
202203
single-source/XorLoop
203204
cxx-source/CreateObjects
204205
cxx-source/CxxSetToCollection
206+
cxx-source/CxxStringConversion
205207
cxx-source/CxxVectorSum
206208
cxx-source/ReadAccessor
207209
)

0 commit comments

Comments
 (0)