Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
ece0399
[Runtime] Have ConcurrentReadableHashMap use 1-byte or 2-byte indices…
mikeash Sep 22, 2020
4fa17bf
SR-12022: refactor LiteralExpr to combine common initializer code
Interfere Sep 29, 2020
c6fc53e
[Sema] Define availability via compiler flag
xymus Jul 28, 2020
5ed2616
[Sema] Report availability macros in inlinable code
xymus Oct 6, 2020
d3e6ffd
[lldb-toolbox] Add the ability to disassemble-to-file a specific func…
gottesmm Oct 6, 2020
8f43d88
Sema: Disallow usage of settable Self-returning storage requirements …
AnthonyLatsis Oct 7, 2020
456a505
[Sema] Adjust mutability in buildStorageRef appropriately for accessors
hborla Oct 7, 2020
0c6ef58
[DeclChecker] Explicitly compute captures for local functions in the …
hborla Oct 7, 2020
703eece
[NFC] Extract ModuleInputs as a Separate Utility
CodaFi Oct 7, 2020
25978e1
[NFC] Add InputInfo::makeNeedsCascadingRebuild
CodaFi Oct 7, 2020
83f5162
[NFC] Reorder InputInfo::Status In Terms of Impact on the Incremental…
CodaFi Oct 7, 2020
d29dcf8
[NFC] Upgrade CompileJobAction::InputInfo::Status to an enum class
CodaFi Oct 7, 2020
84f9ba3
Use ModuleInputs instead of a Vector to build MergeModules
CodaFi Oct 7, 2020
a81cf93
[NFC] Promote MergeModuleJobAction to an IncrementalJobAction
CodaFi Oct 7, 2020
cecb7c8
Schedule MergeModules Incrementally
CodaFi Oct 7, 2020
5e892b3
Sema: Eagerly expand scopes in TypeCheckASTNodeAtLocRequest
slavapestov Oct 6, 2020
0c11fad
ASTScope: Don't silently drop duplicate AST nodes
slavapestov Oct 6, 2020
ee0d008
Parse: Preserve source order when code completion adds delayed declar…
slavapestov Oct 7, 2020
14620a3
ASTScope: Remove source range sorting
slavapestov Oct 6, 2020
63dcd4e
[Concurrency] Fix parsing bug async function types and labeled parame…
DougGregor Oct 8, 2020
8b5a55d
Merge pull request #34180 from spevans/pr_static_executable_fix_1lib
swift-ci Oct 8, 2020
15fc0fe
Merge pull request #34234 from DougGregor/concurrency-async-parse-lab…
DougGregor Oct 8, 2020
a7a47e5
Merge pull request #34230 from hborla/build-storage-ref-lvalue
hborla Oct 8, 2020
fa6f1b6
Merge pull request #33439 from xymus/expand-avail
xymus Oct 8, 2020
939f547
[Build Script] Pass Foundation and Dispatch build directories to the …
artemcm Oct 8, 2020
767c1a0
[ConstraintSystem] NFC: Move `SolutionResult.h` to `include/swift/Sema`
xedin Oct 8, 2020
087906a
[ConstraintSystem] NFC: Move `OverloadChoice.h` to `include/swift/Sema`
xedin Oct 7, 2020
f2614de
[ConstraintSystem] NFC: Move `ConstraintLocator.h` to `include/swift/…
xedin Oct 7, 2020
ab951c2
[ConstraintSystem] NFC: Move `ConstraintGraph{Scope}.h` to `include/s…
xedin Oct 7, 2020
4954763
[ConstraintSystem] NFC: Move `CSFix.h` to `include/swift/Sema`
xedin Oct 7, 2020
6ba7ecb
[ConstraintSystem] NFC: Move `Constraint.h` to `include/swift/Sema`
xedin Oct 7, 2020
461eaff
[ConstraintSystem] NFC: Move `ConstraintSystem.h` to `include/swift/S…
xedin Oct 8, 2020
d369ce1
Merge pull request #34063 from mikeash/concurrenthashmap-indices-shrink
mikeash Oct 8, 2020
e6b140e
[Runtime] NFC: Fix `swift_runtime_unreachable` to `swift_unreachable`
xedin Oct 8, 2020
a373e85
Merge pull request #34237 from xedin/fix-rename-of-unreachable
shahmishal Oct 8, 2020
630aff7
[Runtime] Change SimpleGlobalCache to use ConcurrentReadableHashMap i…
mikeash Oct 7, 2020
8470a66
[windows] Avoid %r for quoting module-cache-path in Windows.
drodriguez Oct 4, 2020
cb70220
Merge pull request #34226 from slavapestov/astscope-source-range-sorting
slavapestov Oct 8, 2020
c5e1388
ASTScope: Remove cull()
slavapestov Oct 7, 2020
89ea51e
ASTScope: Remove isLocalizable()
slavapestov Oct 7, 2020
ea9f84f
ASTScope: Remove addSiblingsToScopeTree()
slavapestov Oct 7, 2020
885f6eb
ASTScope: Rename addChildrenForAllLocalizableAccessorsInSourceOrder()
slavapestov Oct 7, 2020
b720c04
ASTScope: Simplify a couple of getSourceRangeOfThisASTNode() methods
slavapestov Oct 7, 2020
4b0d39c
AST: Clean up and write better comments for source range assertions i…
slavapestov Oct 8, 2020
4f49b6a
Merge pull request #34231 from CodaFi/skippy
CodaFi Oct 8, 2020
d8f46dd
Fix a ptrauth test that I broke in #34213.
rjmccall Oct 8, 2020
ef26ecf
ASTScope: Allocate list of local bindings for BraceStmt in the ASTCon…
slavapestov Oct 8, 2020
9bcec37
Add testcase for rdar://problem/17503169 / https://bugs.swift.org/bro…
slavapestov Oct 9, 2020
be23120
[CodeCompletion][CSGen] Treat ErrorExprs as holes when generating con…
Oct 8, 2020
771738c
[utils/build-parser-lib] Add '--no-install' option to skip installing.
akyrtzi Oct 9, 2020
a665ba6
Merge pull request #34248 from akyrtzi/build-parser-lib-no-install
akyrtzi Oct 9, 2020
98903b7
[Concurrency] Add globalActor attribute.
DougGregor Oct 5, 2020
b848bf7
[parser lib build] For the "parser lib only" build, avoid building un…
akyrtzi Oct 9, 2020
df883f8
[Concurrency] Allow global actor annotations on declarations.
DougGregor Oct 5, 2020
e61ffea
[Sema] Check availability in inlinable code using the explicit version
xymus Aug 31, 2020
53e04cb
[Sema] Test explicit versions in TypeRefinementContext
xymus Sep 1, 2020
2f182c2
[Sema] Consider unavailable functions as being unreachable
xymus Sep 2, 2020
39ee591
[SIL] Don't print availability for unreachable/unavailable functions
xymus Sep 3, 2020
4099ddf
Ensure Changes to External Dependencies Cascade
CodaFi Oct 9, 2020
c79d5cf
[Sema] Still use the current minimum deployment target as fallback
xymus Sep 11, 2020
25c9ddd
[Sema] Prioritize unavailability check for protocol witnesses
xymus Sep 11, 2020
f536a58
[Sema] Silence an inconsistent availability error for the stdlib
xymus Sep 16, 2020
429017f
[ClangImporter] Import unavailable decls as unavailable
xymus Sep 17, 2020
d2343f2
[Sema] Create a new TypeRefinementContext only for explicit inlinables
xymus Sep 21, 2020
1ca852e
[Sema] Accept unavailable constructors override in unavailable types
xymus Sep 17, 2020
fca7d36
[Sema] Use the deployment target as minimum OS version in swiftinterf…
xymus Oct 6, 2020
aced5c7
SILOptimizer: Remove InspectionMode from MemBehehaviorVisitor
eeckstein Oct 6, 2020
d4a6bd3
SILOptimizer: improve MemBehavior for apply instructions.
eeckstein Oct 9, 2020
9f85cb8
TempRValueElimination: handle potential modifications of the copy-sou…
eeckstein Oct 9, 2020
68f4854
SILOptimizer: add an additional TempRValueOpt pass later in the pipel…
eeckstein Oct 9, 2020
a482c9c
[build] Remove FILES_MATCHING from SwiftShims/CMakeLists.txt (#34241)
edymtt Oct 9, 2020
0253220
Merge pull request #34250 from akyrtzi/parser-lib-build-less-build
akyrtzi Oct 9, 2020
658fca1
Merge pull request #34233 from artemcm/SwiftDriverCMakeBuild
artemcm Oct 9, 2020
001e7bb
Merge pull request #34246 from slavapestov/local-function-overloading…
slavapestov Oct 9, 2020
98614d1
Merge pull request #34238 from nathawes/handle-error-exprs-when-gener…
Oct 9, 2020
4e8ed24
Merge pull request #34240 from rjmccall/ptrauth-protocols-test-fix
rjmccall Oct 9, 2020
3946977
Merge pull request #34251 from CodaFi/walking-externalities
CodaFi Oct 9, 2020
7758492
[Concurrency] Implement global actor isolation rules.
DougGregor Oct 9, 2020
0ba4e33
[NFC] Lambda-fy an Assertion
CodaFi Oct 9, 2020
3cc1dbb
Drop a Needless Reset of An Inherited Type
CodaFi Oct 9, 2020
ff8d5bc
[NFC] MutableArrayRef<TypeLoc> -> ArrayRef<TypeLoc>
CodaFi Oct 9, 2020
59b00d1
[NFC] Make EnumRawTypeRequest Cached
CodaFi Oct 9, 2020
c6f4be2
[Concurrency] Eliminate "privileged" forms of ActorIsolation.
DougGregor Oct 9, 2020
9c983a4
[Concurrency] Rename IsolationRestriction and use it more widely.
DougGregor Oct 9, 2020
a91cede
[Parse][CodeCompletion] Don't special case code completion when formi…
Oct 9, 2020
00501fc
Update GettingStarted doc to use `--scheme` for update-checkout script
shahmishal Oct 9, 2020
1b708ac
Merge pull request #34235 from xedin/cs-header-to-include
xedin Oct 9, 2020
3b807a4
[Concurrency] Handle substitutions into generic global actors.
DougGregor Oct 9, 2020
33109db
Merge pull request #34259 from apple/shahmishal/fix-getting-started-doc
shahmishal Oct 10, 2020
4117512
[Syntax] Parse attributed types in expr position as TypeExprSyntax
rintaro Oct 9, 2020
a26fc55
Merge pull request #34243 from slavapestov/fix-astscope-leak
slavapestov Oct 10, 2020
b440ab7
[NFC] Move several types/functions to Import.h
beccadax Sep 25, 2020
f3d99ce
[NFC] Turn ImportedModuleDesc into AttributedImport
beccadax Sep 13, 2020
c489fff
[NFC] Rename and document fields of AttributedImport
beccadax Sep 25, 2020
8070e8a
[NFC] Use AttributedImport in import resolution
beccadax Sep 25, 2020
d55c5bd
[NFC] Add type for ModuleDecl::getImplicitImports()
beccadax Sep 25, 2020
563386b
[NFC] Eliminate ImplicitImport
beccadax Sep 25, 2020
c13067a
[NFC] Rework ImplicitImportInfo::ModuleNames
beccadax Sep 25, 2020
d02b34c
[NFC] Add conveniences to clean up import code
beccadax Sep 13, 2020
7f14aff
[NFC] Give NullablePtr some PointerLikeTypeTraits
beccadax Sep 25, 2020
bf074b0
Run some implicit imports through import resolution
beccadax Sep 26, 2020
f719237
Add -testable-import-module frontend flag
beccadax Sep 14, 2020
48b866b
[NFC] Compare spiGroups in DenseMapInfo
beccadax Oct 10, 2020
944ad88
[NFC] Improve simple_display for AttributedImport
beccadax Oct 10, 2020
4481e3b
Generalize SWIFT_RUNTIME_EXPORT to work for other runtime libraries.
rjmccall Oct 10, 2020
b13ce50
Merge pull request #34232 from slavapestov/misc-astscope-cleanups
slavapestov Oct 10, 2020
cf34fa5
Merge pull request #34253 from nathawes/nfc-always-form-single-expres…
Oct 10, 2020
301fa01
Merge pull request #34258 from CodaFi/innumerable-enumerables
CodaFi Oct 10, 2020
2324ace
Update the Apple Watch Simulator to Series 5
shahmishal Oct 10, 2020
4419f87
Merge pull request #34201 from DougGregor/concurrency-global-actor
DougGregor Oct 10, 2020
169948f
Merge pull request #34176 from drodriguez/windows-percent-r-is-bad
drodriguez Oct 10, 2020
ec9f5a2
WinSDK: extract WinNT into a separate submodule
egorzhdan Sep 16, 2020
0290736
Merge pull request #34245 from rjmccall/generalize-export-attributes
rjmccall Oct 10, 2020
2a7a3eb
[windows] Use extended length paths for os.walk invocation.
drodriguez Oct 10, 2020
8051532
Merge pull request #33929 from egorzhdan/winsdk
compnerd Oct 10, 2020
1de9668
Merge pull request #34257 from rintaro/syntax-typeexpr-rdar70101520
rintaro Oct 10, 2020
df94c4f
[CodeCompletion] Remove parser hacks regarding type body fingerprints
rintaro Oct 9, 2020
7bc5c5e
SIL: Fix ownership verifier to handle some missing interior pointer p…
slavapestov Oct 9, 2020
53560fe
Merge pull request #34265 from drodriguez/windows-rewrite-module-triples
drodriguez Oct 11, 2020
5096345
DI: Handle instructions that initialize multiple tuple elements
slavapestov Oct 10, 2020
53b91da
DI: Remove scalarization 'pass'
slavapestov Oct 10, 2020
3bc381b
Merge pull request #34214 from AnthonyLatsis/coself-mut
AnthonyLatsis Oct 11, 2020
681805d
WinSDK: extract Networking submodule
egorzhdan Oct 11, 2020
adbcd6a
Merge pull request #34267 from slavapestov/misc-sil-cleanup
slavapestov Oct 11, 2020
a2ca44b
SILGen: Pass the correct abstraction pattern to emitApplyOfStoredProp…
slavapestov Oct 9, 2020
5d9e704
SILGen: Move BlackHoleInitialization to Initialization.h
slavapestov Oct 9, 2020
47e32d1
SILGen: Peephole Conversion::OrigToSubst / Conversion::SubstToOrig
slavapestov Oct 9, 2020
85b94a4
SILGen: Refactor emitMemberInitializers() to use Initialization
slavapestov Oct 9, 2020
7fd4615
SILGen: Fix crash when a stored property with an initial value has a …
slavapestov Oct 9, 2020
3d160d9
Sema: Move SimpleDidSetRequest::evaluate() to TypeCheckStorage.cpp
slavapestov Oct 9, 2020
b047f9e
[windows] Provide %long-tmp in Windows for extended length temp paths.
drodriguez Oct 11, 2020
e843a16
Merge pull request #33935 from brentdax/these-imports-are-testing-my-…
beccadax Oct 11, 2020
9a0c43d
Merge pull request #34269 from slavapestov/did-set-cleanup
slavapestov Oct 11, 2020
1cb8236
Merge pull request #34255 from slavapestov/reabstract-stored-property…
slavapestov Oct 11, 2020
53bdffd
Merge pull request #34268 from egorzhdan/winsdk
compnerd Oct 11, 2020
6f15007
XFAIL Incremental/CrossModule tests
beccadax Oct 12, 2020
87f7097
Merge pull request #34273 from brentdax/xfail-70175753
swift-ci Oct 12, 2020
0f6f429
Merge pull request #34252 from eeckstein/temp-rvalue-opt
eeckstein Oct 12, 2020
826f17e
Decouple detection of «Self ==» constraints from SelfReferenceKind
AnthonyLatsis Oct 8, 2020
4ee517f
AST: Refactor SelfReferenceKind in preparation for #33767
AnthonyLatsis Oct 9, 2020
0f6611c
[build] properly install compiler-rt from Xcode toolchain (#31247)
edymtt Oct 12, 2020
be38df8
[build] Adjust install name for Differentiation and Concurrency (#34216)
edymtt Oct 12, 2020
77f1647
RCIdentityAnalysis: some refactoring to improve clarity.
eeckstein Oct 12, 2020
8c3081c
test: Remove duplicate test for -static-executable
spevans Oct 12, 2020
b994bf3
Add support for `_specialize(exported: true, ...)`
aschwaighofer Sep 18, 2020
2a2cf91
Add support for marking a _specialize attribute as SPI
aschwaighofer Oct 9, 2020
d6d79c6
Merge two fields into a PointerUnion in SILDeclRef to save space
aschwaighofer Oct 9, 2020
1696f4d
Merge pull request #34256 from rintaro/ide-completion-rdar69890297
rintaro Oct 12, 2020
f9d6c6a
[Dependency Scanner] Refactor ModuleDependencies to represent binary-…
artemcm Oct 8, 2020
6fce6d9
[Async CC] Pull poly params from entry point emission.
nate-chandler Oct 12, 2020
04606d5
Merge pull request #34275 from spevans/pr_remove_duplicate_test
beccadax Oct 12, 2020
64d4465
Merge pull request #34132 from Interfere/SR-12022-LiteralExpr-refacto…
xedin Oct 12, 2020
ac116cf
Parse: Remove AlreadyHandledDecls set
slavapestov Oct 12, 2020
39ef28a
Merge pull request #34263 from apple/shahmishal/update-watch-to-series-5
shahmishal Oct 12, 2020
0e05b51
When converting load [copy] -> load_borrow, do not insert end_borrow …
gottesmm Oct 12, 2020
d996359
[Parse] Parse opaque result types in closure signature position
rintaro Oct 12, 2020
c9115dc
Merge pull request #34277 from nate-chandler/concurrency/irgen/thread…
nate-chandler Oct 12, 2020
edef3d6
Merge pull request #34271 from drodriguez/windows-long-tmp-path
compnerd Oct 12, 2020
2d8f073
[Concurrency] Implement global actor isolation checking for conforman…
DougGregor Oct 12, 2020
54fc26f
Merge pull request #34282 from rintaro/parse-opaque-closure
rintaro Oct 12, 2020
3221734
Merge pull request #34244 from artemcm/RefactorScannerBinaryDependencies
artemcm Oct 13, 2020
0b456ba
Merge pull request #34283 from slavapestov/small-parser-cleanup
slavapestov Oct 13, 2020
9041861
[CodeCompletion] Reuse CompletionContextFinder for fallback completio…
Oct 13, 2020
5f5d9e4
Merge pull request #34285 from DougGregor/global-actor-conformance-ch…
DougGregor Oct 13, 2020
fb76ff1
[Sema] Report non-constructor unavailable overrides as warnings
xymus Oct 13, 2020
36e95ca
Merge pull request #34280 from gottesmm/pr-94bbbe81fdf8a4d1212dd582f8…
gottesmm Oct 13, 2020
dfc5c70
[SIL] [Parser] Move SILParserTUState into SILParserState.h
zoecarver Apr 24, 2020
af2cfc5
Merge remote-tracking branch 'apple/main' into katei/merge-main-2020-…
kateinoigakukun Oct 13, 2020
34bfbe2
Merge pull request #31254 from zoecarver/sil-parser/sil-parser-state-…
swift-ci Oct 13, 2020
4512717
Merge pull request #34274 from eeckstein/rc-identity
eeckstein Oct 13, 2020
2d6456c
[ConstraintSystem] NFC: Remove obsolete `getPotentialBindings` declar…
xedin Oct 13, 2020
b0c9e69
SideEffectAnalysis: don't assume that arguments with trivial type can…
eeckstein Oct 13, 2020
ec10c5d
Merge pull request #34249 from AnthonyLatsis/selfrefkind-refactor
AnthonyLatsis Oct 13, 2020
67d311d
Merge pull request #34289 from eeckstein/fix-side-effect-analysis
eeckstein Oct 13, 2020
fd3e3cf
Merge pull request #32657 from aschwaighofer/wip_prespecialize_exported
aschwaighofer Oct 13, 2020
9249186
Merge pull request #33855 from xymus/availability-inlinable
xymus Oct 13, 2020
8b452ac
docs: convert Serialization.rst to Markdown (#34279)
MaxDesiatov Oct 13, 2020
9163277
Merge pull request #34202 from gottesmm/pr-a0fd6cbd3a716a3d0da4a2673f…
gottesmm Oct 13, 2020
a09ae48
[Dependency Scanner] Always add NonPathCommandLine arguments from Cla…
artemcm Oct 12, 2020
4ab3cb1
Revert "Implements SR-11580"
rintaro Oct 13, 2020
abd4608
Merge pull request #34287 from nathawes/reuse-completion-context-find…
Oct 13, 2020
4351bd3
Use The Location of the Pattern Binding in Codable Fixit
CodaFi Oct 13, 2020
d793878
Schedule merge-modules When modulewrap Job is in the Queue
CodaFi Oct 13, 2020
6f7235d
Merge pull request #34292 from rintaro/revert-pr33948
rintaro Oct 13, 2020
daca3d9
Merge pull request #34225 from mikeash/simpleglobalcache-concurrentre…
mikeash Oct 13, 2020
a253c40
Merge pull request #34294 from CodaFi/patterns-as-compiler-bugs
swift-ci Oct 13, 2020
55c39c1
Merge pull request #34291 from artemcm/NeverForgetAnArgument
artemcm Oct 13, 2020
1d8f07a
Merge pull request #34288 from xedin/remove-getpotentialbindings-from-cs
xedin Oct 14, 2020
23605e1
Merge pull request #34296 from CodaFi/seaweed-wrap
CodaFi Oct 14, 2020
546a58a
Merge remote-tracking branch 'apple/main' into katei/merge-main-2020-…
kateinoigakukun Oct 14, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ CHANGELOG
Swift Next
----------

* [SR-10069][]:

Function overloading now works in local contexts, making the following valid:

```swift
func outer(x: Int, y: String) {
func doIt(_: Int) {}
func doIt(_: String) {}

doIt(x) // calls the first 'doIt(_:)' with an Int value
doIt(y) // calls the second 'doIt(_:)' with a String value
}
```

* [SE-0284][]:

Functions, subscripts, and initializers may now have more than one variadic parameter, as long as all parameters which follow variadic parameters are labeled. This makes declarations like the following valid:
Expand Down Expand Up @@ -8196,6 +8210,7 @@ Swift 1.0
[SR-8974]: <https://bugs.swift.org/browse/SR-8974>
[SR-9043]: <https://bugs.swift.org/browse/SR-9043>
[SR-9827]: <https://bugs.swift.org/browse/SR-9827>
[SR-10069]: <https://bugs.swift.org/browse/SR-10069>
[SR-11298]: <https://bugs.swift.org/browse/SR-11298>
[SR-11429]: <https://bugs.swift.org/browse/SR-11429>
[SR-11700]: <https://bugs.swift.org/browse/SR-11700>
Expand Down
1 change: 1 addition & 0 deletions docs/ABI/Mangling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ Function Specializations
::

specialization ::= type '_' type* 'Tg' SPEC-INFO // Generic re-abstracted specialization
specialization ::= type '_' type* 'Ts' SPEC-INFO // Generic re-abstracted prespecialization
specialization ::= type '_' type* 'TG' SPEC-INFO // Generic not re-abstracted specialization
specialization ::= type '_' type* 'Ti' SPEC-INFO // Inlined function with generic substitutions.

Expand Down
2 changes: 1 addition & 1 deletion docs/HowToGuides/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ toolchain as a one-off, there are a couple of differences:
or a specific snapshot. You can update the branch/tag for all repositories
as follows:
```sh
utils/update-checkout --branch mybranchname
utils/update-checkout --scheme mybranchname
# OR
utils/update-checkout --tag mytagname
```
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ documentation, please create a thread on the Swift forums under the
lazy type-checking and efficient caching.
- [Literals.md](/docs/Literals.md):
Describes type-checking and inference specifically for literals.
- [Serialization.rst](/docs/Serialization.rst):
- [Serialization.md](/docs/Serialization.md):
Gives an overview of the LLVM bitcode format used for swiftmodules.
- [StableBitcode.md](/docs/StableBitcode.md):
Describes how to maintain compatibility when changing the serialization
Expand Down
34 changes: 11 additions & 23 deletions docs/Serialization.rst → docs/Serialization.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
:orphan:

=================================
Swift Binary Serialization Format
=================================
# Swift Binary Serialization Format

The fundamental unit of distribution for Swift code is a *module.* A module
contains declarations as an interface for clients to write code against. It may
Expand Down Expand Up @@ -33,10 +29,9 @@ tied to the compiler internals to be useful for this purpose, and it is likely
we'll invent a new format instead.


Why LLVM bitcode?
=================
## Why LLVM bitcode?

The `LLVM bitstream <http://llvm.org/docs/BitCodeFormat.html>`_ format was
The [LLVM bitstream](http://llvm.org/docs/BitCodeFormat.html) format was
invented as a container format for LLVM IR. It is a binary format supporting
two basic structures: *blocks,* which define regions of the file, and
*records,* which contain data fields that can be up to 64 bits. It has a few
Expand All @@ -60,10 +55,9 @@ have most of these properties as well. But we're already linking against
LLVM...might as well use it!


Versioning
==========
## Versioning

.. warning::
#### _Warning_

This section is relevant to any forward-compatible format used for a
library's public interface. However, as mentioned above this may not be
Expand Down Expand Up @@ -101,13 +95,11 @@ requires extra work on the compiler's part to detect which features are in use;
a simpler implementation would just use the latest version number supported:
1.9.

*This versioning scheme was inspired by* `Semantic Versioning
<http://semver.org>`_. *However, it is not compatible with Semantic Versioning
*This versioning scheme was inspired by* [Semantic Versioning](http://semver.org). *However, it is not compatible with Semantic Versioning
because it promises* forward-compatibility *rather than* backward-compatibility.


A High-Level Tour of the Current Module Format
==============================================
## A High-Level Tour of the Current Module Format

Every serialized module is represented as a single block called the "module
block". The module block is made up of several other block kinds, largely for
Expand All @@ -132,7 +124,7 @@ organizational purposes.
- The **SIL block** contains SIL-level implementations that can be imported
into a client's SILModule context. In most cases this is just a performance
concern, but sometimes it affects language semantics as well, as in the case
of ``@_transparent``. The SIL block precedes the AST block because it affects
of `@_transparent`. The SIL block precedes the AST block because it affects
which AST nodes get serialized.

- The **SIL index block** contains tables for accessing various SIL entities by
Expand All @@ -145,9 +137,7 @@ organizational purposes.
Nodes are accessed by a file-unique "DeclIDs" (also covering DeclContexts)
and "TypeIDs"; the two sets of IDs use separate numbering schemes.

.. note::

The AST block is currently referred to as the "decls block" in the source.
_note_: The AST block is currently referred to as the "decls block" in the source.

- The **identifier block** contains a single blob of strings. This is intended
for Identifiers---strings uniqued by the ASTContext---but can in theory
Expand All @@ -160,13 +150,11 @@ organizational purposes.
top-level declarations.


SIL
===
## SIL

[to be written]


Cross-reference resilience
==========================
## Cross-reference resilience

[to be written]
35 changes: 4 additions & 31 deletions include/swift/AST/ASTScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ class ASTScopeImpl {
#pragma mark - source ranges

public:
/// Return signum of ranges. Centralize the invariant that ASTScopes use ends.
static int compare(SourceRange, SourceRange, const SourceManager &,
bool ensureDisjoint);

CharSourceRange getCharSourceRangeOfScope(SourceManager &SM,
bool omitAssertions = false) const;
bool isCharSourceRangeCached() const;
Expand All @@ -224,7 +220,6 @@ class ASTScopeImpl {
virtual NullablePtr<DeclAttribute> getDeclAttributeIfAny() const {
return nullptr;
}
virtual NullablePtr<const void> getReferrent() const { return nullptr; }

#pragma mark - debugging and printing

Expand Down Expand Up @@ -402,7 +397,6 @@ class ASTSourceFileScope final : public ASTScopeImpl {
public:
SourceFile *const SF;
ScopeCreator *const scopeCreator;
ASTScopeImpl *insertionPoint;

ASTSourceFileScope(SourceFile *SF, ScopeCreator *scopeCreator);

Expand Down Expand Up @@ -470,9 +464,6 @@ class Portion {
virtual NullablePtr<const ASTScopeImpl>
getLookupLimitFor(const GenericTypeOrExtensionScope *) const;

virtual const Decl *
getReferrentOfScope(const GenericTypeOrExtensionScope *s) const;

virtual NullablePtr<ASTScopeImpl>
insertionPointForDeferredExpansion(IterableTypeScope *) const = 0;
};
Expand All @@ -493,9 +484,6 @@ class Portion {
NullablePtr<const ASTScopeImpl>
getLookupLimitFor(const GenericTypeOrExtensionScope *) const override;

const Decl *
getReferrentOfScope(const GenericTypeOrExtensionScope *s) const override;

NullablePtr<ASTScopeImpl>
insertionPointForDeferredExpansion(IterableTypeScope *) const override;
};
Expand Down Expand Up @@ -570,7 +558,6 @@ class GenericTypeOrExtensionScope : public ASTScopeImpl {

virtual Decl *getDecl() const = 0;
NullablePtr<Decl> getDeclIfAny() const override { return getDecl(); }
NullablePtr<const void> getReferrent() const override;

private:
AnnotatedInsertionPoint
Expand Down Expand Up @@ -745,7 +732,6 @@ class GenericParamScope final : public ASTScopeImpl {

/// Actually holder is always a GenericContext, need to test if
/// ProtocolDecl or SubscriptDecl but will refactor later.
NullablePtr<const void> getReferrent() const override;
std::string getClassName() const override;
SourceRange
getSourceRangeOfThisASTNode(bool omitAssertions = false) const override;
Expand Down Expand Up @@ -788,8 +774,6 @@ class AbstractFunctionDeclScope final : public ASTScopeImpl {
virtual NullablePtr<Decl> getDeclIfAny() const override { return decl; }
Decl *getDecl() const { return decl; }

NullablePtr<const void> getReferrent() const override;

protected:
NullablePtr<const GenericParamList> genericParams() const override;
};
Expand All @@ -813,7 +797,6 @@ class ParameterListScope final : public ASTScopeImpl {

private:
void expandAScopeThatDoesNotCreateANewInsertionPoint(ScopeCreator &);
SourceLoc fixupEndForBadInput(SourceRange) const;

public:
std::string getClassName() const override;
Expand Down Expand Up @@ -902,7 +885,6 @@ class AttachedPropertyWrapperScope final : public ASTScopeImpl {
NullablePtr<DeclAttribute> getDeclAttributeIfAny() const override {
return attr;
}
NullablePtr<const void> getReferrent() const override;

private:
void expandAScopeThatDoesNotCreateANewInsertionPoint(ScopeCreator &);
Expand Down Expand Up @@ -970,8 +952,6 @@ class PatternEntryDeclScope final : public AbstractPatternEntryScope {
SourceRange
getSourceRangeOfThisASTNode(bool omitAssertions = false) const override;

NullablePtr<const void> getReferrent() const override;

protected:
bool lookupLocalsOrMembers(DeclConsumer) const override;
bool isLabeledStmtLookupTerminator() const override;
Expand Down Expand Up @@ -1072,7 +1052,6 @@ class CaptureListScope final : public ASTScopeImpl {
getSourceRangeOfThisASTNode(bool omitAssertions = false) const override;
NullablePtr<Expr> getExprIfAny() const override { return expr; }
Expr *getExpr() const { return expr; }
NullablePtr<const void> getReferrent() const override;
bool lookupLocalsOrMembers(DeclConsumer) const override;
};

Expand All @@ -1094,7 +1073,6 @@ class ClosureParametersScope final : public ASTScopeImpl {
}
NullablePtr<Expr> getExprIfAny() const override { return closureExpr; }
Expr *getExpr() const { return closureExpr; }
NullablePtr<const void> getReferrent() const override;

protected:
ASTScopeImpl *expandSpecifically(ScopeCreator &scopeCreator) override;
Expand Down Expand Up @@ -1128,7 +1106,6 @@ class TopLevelCodeScope final : public ASTScopeImpl {
getSourceRangeOfThisASTNode(bool omitAssertions = false) const override;
virtual NullablePtr<Decl> getDeclIfAny() const override { return decl; }
Decl *getDecl() const { return decl; }
NullablePtr<const void> getReferrent() const override;
};

/// The \c _@specialize attribute.
Expand All @@ -1153,7 +1130,6 @@ class SpecializeAttributeScope final : public ASTScopeImpl {
NullablePtr<DeclAttribute> getDeclAttributeIfAny() const override {
return specializeAttr;
}
NullablePtr<const void> getReferrent() const override;

protected:
ASTScopeImpl *expandSpecifically(ScopeCreator &) override;
Expand Down Expand Up @@ -1183,7 +1159,6 @@ class DifferentiableAttributeScope final : public ASTScopeImpl {
NullablePtr<DeclAttribute> getDeclAttributeIfAny() const override {
return differentiableAttr;
}
NullablePtr<const void> getReferrent() const override;

protected:
ASTScopeImpl *expandSpecifically(ScopeCreator &) override;
Expand Down Expand Up @@ -1214,7 +1189,6 @@ class SubscriptDeclScope final : public ASTScopeImpl {
public:
virtual NullablePtr<Decl> getDeclIfAny() const override { return decl; }
Decl *getDecl() const { return decl; }
NullablePtr<const void> getReferrent() const override;

protected:
NullablePtr<const GenericParamList> genericParams() const override;
Expand Down Expand Up @@ -1244,7 +1218,6 @@ class AbstractStmtScope : public ASTScopeImpl {
getSourceRangeOfThisASTNode(bool omitAssertions = false) const override;
virtual Stmt *getStmt() const = 0;
NullablePtr<Stmt> getStmtIfAny() const override { return getStmt(); }
NullablePtr<const void> getReferrent() const override;

protected:
bool isLabeledStmtLookupTerminator() const override;
Expand Down Expand Up @@ -1559,11 +1532,11 @@ class BraceStmtScope final : public AbstractStmtScope {
BraceStmt *const stmt;

/// Declarations which are in scope from the beginning of the statement.
SmallVector<ValueDecl *, 2> localFuncsAndTypes;
ArrayRef<ValueDecl *> localFuncsAndTypes;

/// Declarations that are normally in scope only after their
/// definition.
SmallVector<VarDecl *, 2> localVars;
ArrayRef<VarDecl *> localVars;

/// The end location for bindings introduced in this scope. This can
/// extend past the actual end of the BraceStmt in top-level code,
Expand All @@ -1573,8 +1546,8 @@ class BraceStmtScope final : public AbstractStmtScope {

public:
BraceStmtScope(BraceStmt *e,
SmallVector<ValueDecl *, 2> localFuncsAndTypes,
SmallVector<VarDecl *, 2> localVars,
ArrayRef<ValueDecl *> localFuncsAndTypes,
ArrayRef<VarDecl *> localVars,
SourceLoc endLoc)
: stmt(e),
localFuncsAndTypes(localFuncsAndTypes),
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/ASTTypeIDZone.def
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SWIFT_TYPEID(BodyInitKindAndExpr)
SWIFT_TYPEID(CtorInitializerKind)
SWIFT_TYPEID(FunctionBuilderBodyPreCheck)
SWIFT_TYPEID(GenericSignature)
SWIFT_TYPEID(ImplicitImport)
SWIFT_TYPEID(ImplicitImportList)
SWIFT_TYPEID(ImplicitMemberAction)
SWIFT_TYPEID(ParamSpecifier)
SWIFT_TYPEID(PropertyWrapperBackingPropertyInfo)
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/ASTTypeIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class GenericTypeParamType;
class InfixOperatorDecl;
class IterableDeclContext;
class ModuleDecl;
struct ImplicitImport;
struct ImplicitImportList;
class NamedPattern;
class NominalTypeDecl;
class OperatorDecl;
Expand Down
Loading