Skip to content

[6.0] Fix LifetimeDependenceDiagnostics to ignore closure captures #72665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 334 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
334 commits
Select commit Hold shift + click to select a range
d256193
[stdlib] Update SwiftStdlibLegacyABI convention to use `@available(sw…
lorentey Mar 15, 2024
6f68ac1
[stdlib] withUnsafePointer: Spell out Error conformance on E
lorentey Mar 15, 2024
f915f2c
[stdlib] Make MemoryLayout techically copyable
lorentey Mar 15, 2024
4eac03d
[stdlib] Apply minor review notes
lorentey Mar 15, 2024
e0967b6
[stdlib] {consuming,borrowing}{Flat,}Map: adopt typed throws
lorentey Mar 15, 2024
7e43a51
[stdlib] Use hasFeature(Foo) instead of opaque $Foo syntax
lorentey Mar 15, 2024
6906d99
[stdlib] Apply @Azoy’s remaining review notes (thanks!)
lorentey Mar 15, 2024
864888c
[stdlib] Remove all new public API for now
lorentey Mar 15, 2024
340e7d3
[Synchronization] Generalize U[M]BP’s AtomicRepresentable conformance
lorentey Mar 15, 2024
30e4678
[util] swift-abi-symbol-checker: Don’t exit early for missing additions
lorentey Mar 15, 2024
7c4e38f
Revert "[build] Enable noncopyable generics; disable anything that pr…
lorentey Mar 15, 2024
92339b9
Revert "[IRGen] Temporarily disable round-tripping debug types"
lorentey Mar 15, 2024
db17bc5
[stdlib] Delete leftover workaround
lorentey Mar 15, 2024
1e003d2
[test] Update tests for new stdlib
lorentey Mar 15, 2024
c80862f
[stdlib] ManagedBuffer: Add @_preInverseGenerics for $Embedded
lorentey Mar 15, 2024
00948f4
[test] XFAIL two new nontrivial test failures
lorentey Mar 15, 2024
392fe28
[gardening] update copyright notice
glessard Mar 15, 2024
587b459
[abi] Update false positives list for api-digester based ABI/source s…
lorentey Mar 15, 2024
10da5ce
[test][IDE] Update code completion expectation
lorentey Mar 15, 2024
1d96db8
[test] Temporarily XFAIL tests that expect swiftinterface files to wo…
lorentey Mar 15, 2024
e561d13
[stdlib] Apply review notes from @glessard (thanks!)
lorentey Mar 15, 2024
b4afcd2
[test][abi] Remove expectations that got resolved by #72348
lorentey Mar 15, 2024
b9b552d
[test] Un-xfail tests that are passing now that NoncopyableGenerics i…
lorentey Mar 18, 2024
71178fe
[test] More test updates
lorentey Mar 18, 2024
9507314
[test] Fix mismerge in old ABI checker’s expectation list
lorentey Mar 18, 2024
6e702af
Sema: Diagnose availability of storage accessors for key paths.
tshortli Mar 19, 2024
bf48b62
Sema: Diagnose availability of accessors in chained assignments.
tshortli Mar 19, 2024
079aa4a
EagerSpecializer: fix a SIL verifier crash
eeckstein Mar 19, 2024
8fcb70c
Merge pull request #72426 from xymus/fix-deser-diags-6.0
xymus Mar 19, 2024
b0439a7
Merge pull request #72394 from xedin/rdar-124549952-6.0
xedin Mar 19, 2024
555278e
Merge pull request #72418 from rintaro/6.0-refactoring-codable-sr72387
rintaro Mar 19, 2024
0030c51
[IRGen] Defer materializing metadata for outlining
nate-chandler Mar 14, 2024
729253c
Merge pull request #72430 from tshortli/key-path-accessor-availabilit…
tshortli Mar 20, 2024
39aa59c
[Concurrency] Don't strip `@Sendable` when determining the actor isol…
hborla Mar 19, 2024
c4e726a
Merge pull request #72436 from lorentey/noncopyable-primitives-6.0
lorentey Mar 20, 2024
025c699
Merge pull request #72419 from rintaro/6.0-parse-ifconfig-argdiag-rda…
rintaro Mar 20, 2024
bb0eb8d
Another prospective fix to this test.
rjmccall Mar 20, 2024
8390acf
Merge pull request #72448 from hborla/6.0-sendable-closures-under-min…
hborla Mar 20, 2024
aa5bd60
FieldSensitivePrunedLiveness: Handle conditionality of `try_apply` defs.
jckarter Mar 20, 2024
3569591
Parse: Diagnose empty version numbers.
tshortli Mar 20, 2024
5f793af
Update SymbolGraphGen test to handle nondeterminism (#72421)
QuietMisdreavus Mar 20, 2024
b70363e
Merge pull request #72438 from eeckstein/fix-eager-specializer-6.0
eeckstein Mar 20, 2024
ef74a8f
Serialization: report type mismatch when it causes a deserialization …
xymus Mar 19, 2024
e82360b
Merge pull request #72447 from nate-chandler/cherrypick/release/6.0/n…
nate-chandler Mar 20, 2024
a3b4d06
Merge pull request #72442 from augusto2112/cp-deb-specialized-types
augusto2112 Mar 20, 2024
9aa860f
[Tests] NFC: Gate preconcurrency conformances runtime test on presenc…
xedin Mar 19, 2024
61fd949
Merge pull request #72451 from rjmccall/fix-isolated-any-test-again-6.0
rjmccall Mar 20, 2024
c7a31f2
[6.0] Replace two `reduce`s with explicit loops in SIMD implementatio…
stephentyrone Mar 20, 2024
06874f0
Merge pull request #72429 from bnbarham/cherry-disable-flakey-test
bnbarham Mar 20, 2024
355c0c9
SILGen: Emit empty type initialization for conditionally-copyable typ…
jckarter Mar 20, 2024
3ed6325
Merge pull request #72457 from xymus/diag-type-mismatch-6.0
xymus Mar 20, 2024
5a527ea
Merge pull request #72454 from tshortli/invalid-availability-version-6.0
tshortli Mar 20, 2024
e85c913
Parse explicit lifetime dependence specifiers in SIL
meg-gupta Mar 18, 2024
ecf1421
[stdlib] Undo the generalization of Result.map & .flatMap for now
lorentey Mar 21, 2024
cfbb82d
Merge pull request #72453 from jckarter/pruned-liveness-try-apply-con…
jckarter Mar 21, 2024
db221d5
Merge pull request #72468 from jckarter/init-conditionally-copyable-e…
jckarter Mar 21, 2024
39d34e1
Merge pull request #72462 from xedin/rdar-123810657-runtime-gate-6.0
xedin Mar 21, 2024
2a13234
Add a new api findUnreferenceableStorage to check if struct or its fi…
meg-gupta Mar 21, 2024
a3156cc
Use swift::findUnreferenceableStorage to ensure we can construct an s…
meg-gupta Mar 21, 2024
7d21fb5
[Test] Disable IDE/complete_operators.swift on Linux (#72491) (#72492)
drexin Mar 21, 2024
0585476
[Gardening] FSPrunedLiveness: Delete dead decl.
nate-chandler Mar 18, 2024
e36c645
[NFC] FSPrunedLiveness: Move impl to cpp file.
nate-chandler Mar 18, 2024
2381f2b
[NFC] MoveOnly: Renamed nonconsumingUses.
nate-chandler Mar 19, 2024
da721e1
[Gardening] Test: Added RUN line breaks.
nate-chandler Mar 20, 2024
f849bdf
[MoveOnly] Track inst-consumed bits in same SBV.
nate-chandler Mar 20, 2024
96b1809
[MoveOnlyAddressChecker] Fix repr for consumes.
nate-chandler Mar 20, 2024
0ee41bd
[test] Update api-digester false positives lists
lorentey Mar 21, 2024
75cab42
Merge pull request #72475 from meg-gupta/cpsilparsing
meg-gupta Mar 21, 2024
a8b01bf
Merge pull request #72497 from nate-chandler/cherrypick/release/6.0/r…
nate-chandler Mar 22, 2024
1a8fa9a
[MoveChecker] Fix visitor return.
nate-chandler Mar 15, 2024
a00bb5b
[Gardening] MoveOnly: Alphabetized switch cases.
nate-chandler Mar 18, 2024
779f58c
[Gardening] MoveOnly: Annotated auto pointers.
nate-chandler Mar 18, 2024
645f61d
[Gardening] MoveOnly: Renamed variable.
nate-chandler Mar 18, 2024
dca3a93
[Gardening] MoveOnly: Replaced dyn_cast with isa.
nate-chandler Mar 18, 2024
991ee50
[NFC] MoveOnly: Used newly standard constructor.
nate-chandler Mar 18, 2024
6a3d5ba
[MoveOnlyPartialConsumption] Fix visibility check.
nate-chandler Mar 20, 2024
05b76f8
[NFC] MoveOnly: Map inst to array of ranges.
nate-chandler Mar 18, 2024
07cf00e
[NFC] MoveOnly: Map operand to list of ranges.
nate-chandler Mar 19, 2024
ff8693a
[MoveOnlyAddressChecker] Handle takes of copyable.
nate-chandler Mar 20, 2024
35bbcdb
[MoveOnlyAddressChecker] Fix enum repr.
nate-chandler Mar 20, 2024
e78e36f
Merge pull request #72489 from meg-gupta/cpsilcombine
meg-gupta Mar 22, 2024
8ab5fc8
[Parser] Remove remaining `-disable-experimental-parser-round-trip` u…
ahoppen Mar 15, 2024
4f23fd1
[SourceKit] Allow generation of cursor info for declarations from sol…
ahoppen Mar 16, 2024
347f873
[Parse] Disallow specifiers in front of parameter declarations
ahoppen Mar 14, 2024
104cbf1
[SILGen] Load trivial in consuming switch.
nate-chandler Mar 21, 2024
18585ef
[cherry-pick release/6.0] [CMake] Move ClangOverlays (_Builtin_float)…
ian-twilightcoder Mar 22, 2024
5afa19c
Merge pull request #72478 from lorentey/undo-Result.map&.flatMap-gene…
lorentey Mar 22, 2024
58ff4c2
Merge pull request #72508 from nate-chandler/cherrypick/release/6.0/r…
nate-chandler Mar 22, 2024
c1f20b0
Merge pull request #72520 from nate-chandler/cherrypick/release/6.0/r…
nate-chandler Mar 22, 2024
254809a
[Demangle-to-type] Properly match extensions of conditionally-copyabl…
DougGregor Mar 19, 2024
ad3f40a
Remove build infrastructure for globally enabling noncopyable types
DougGregor Mar 19, 2024
a2cafe8
Sema: Convert a bunch of if/else into a switch
slavapestov Mar 8, 2024
25a98fa
AST: Remove InverseMarking.h
slavapestov Mar 16, 2024
fda7b86
AST: Refactor unqualified lookup a little bit
slavapestov Mar 15, 2024
3fa334d
AST: Remove TypeRepr::isInverseOf()
slavapestov Mar 15, 2024
01772e3
AST: Refine name lookup rule for protocol extension 'where' clauses
slavapestov Mar 15, 2024
d1d7acf
Document two minor source-breaking bug fixes in Swift 6.0
slavapestov Mar 19, 2024
d94d861
Serialization: Serialize ProtocolDecl::getSuperclassDecl() instead of…
slavapestov Mar 20, 2024
04f45c7
AST: Don't call ProtocolDecl::getSuperclass() in lookupExistentialCon…
slavapestov Mar 20, 2024
b5b1570
RequirementMachine: Don't call ProtocolDecl::getSuperclass() in concr…
slavapestov Mar 20, 2024
b8aef24
Sema: Fix @marker attribute checking
slavapestov Mar 20, 2024
b6e9579
AST: Remove dead code path in ExistentialLayout::getSuperclass()
slavapestov Mar 20, 2024
9224d8b
Sema: Remove unnecessary ProtocolDecl::getSuperclass() check
slavapestov Mar 20, 2024
6cd5d13
AST: Replace a ProtocolDecl::getSuperclass() call
slavapestov Mar 20, 2024
504ca0b
AST: Remove ProtocolDecl::getSuperclass()/setSuperclass()
slavapestov Mar 20, 2024
bb547ce
AST: Shave a yak in ProtocolDecl
slavapestov Mar 21, 2024
5537093
[cxx-interop] Back out ~Copyable changes for now
lorentey Mar 23, 2024
a8463d0
Merge pull request #72526 from DougGregor/demangle-noncopyable-ext-6.0
DougGregor Mar 23, 2024
84a80c2
Merge pull request #72532 from DougGregor/noncopyable-build-cleanup-6.0
DougGregor Mar 23, 2024
b62c395
Merge pull request #72539 from lorentey/roll-back-most-cxxinterop-cha…
lorentey Mar 23, 2024
6cc69fe
[Demangle-to-AST type] Make sure we can find the original nominal typ…
DougGregor Mar 23, 2024
3382dc9
Merge pull request #72542 from DougGregor/demangle-to-ast-nominal-in-…
DougGregor Mar 24, 2024
b218c86
Merge pull request #72528 from slavapestov/cherry-picks-6.0
slavapestov Mar 24, 2024
78430e0
[Associated type inference] Resolve `@_implements` on AsyncSequence.F…
DougGregor Mar 24, 2024
befce89
Merge pull request #72515 from ahoppen/ahoppen/6.0/no-disable-experim…
ahoppen Mar 25, 2024
331dadb
Merge pull request #72517 from ahoppen/ahoppen/6.0/disallow-specifier…
ahoppen Mar 25, 2024
0e7eb75
[6.0] build-script: add flag to pass arguments to dsymutil
edymtt Mar 21, 2024
99742fb
Add test for multiple `@_implements` on associated types
DougGregor Mar 25, 2024
7ad6ef6
[embedded] Specialize superclasses in VTableSpecializer as part of Ma…
kubamracek Mar 16, 2024
8bcd344
[embedded] Compile-time (literal) KeyPaths for Embedded Swift
kubamracek Mar 20, 2024
25e2bb2
[embedded] Respect ownership in SimplifyKeyPath, emit destroy_value i…
kubamracek Mar 22, 2024
426addc
[embedded] Use load_borrow/end_borrow in KeyPathProjector when in OSSA
kubamracek Mar 22, 2024
c5fa323
[embedded] Adjust keypath test expectations, mostly by adding strong_…
kubamracek Mar 22, 2024
4d944bb
[embedded] Guard @_transparent in UnsafePointer APIs with #if
kubamracek Mar 25, 2024
ec5acfc
[Concurrency] Apply `@MainActor` to main dispatch queue operations wi…
hborla Mar 22, 2024
28f443b
PredictableMemOpt: fix a crash, caused by a wrong instruction cast
eeckstein Mar 21, 2024
e07e34a
Merge pull request #72521 from ian-twilightcoder/float_overlay_in_core
ian-twilightcoder Mar 25, 2024
b087794
Merge pull request #72552 from DougGregor/implements-on-asyncsequence…
DougGregor Mar 25, 2024
4f7f3db
AST: `#if hasAttribute(retroactive)` should evaluate true.
tshortli Mar 25, 2024
d426b6f
Merge pull request #72516 from ahoppen/ahoppen/6.0/decl-cursor-info-f…
ahoppen Mar 25, 2024
ac47357
[Distributed] Complete handling of protocol calls (#72549)
ktoso Mar 25, 2024
c71a318
[DebugInfo] [SILGen] Remove invalid debug info from intermediates in …
Snowy1803 Mar 19, 2024
770f837
[DebugInfo] Fix specialization of debug variable types
Snowy1803 Mar 15, 2024
a88b4e4
[DebugInfo] [AutoDiff] Fix empty debug variables being created
Snowy1803 Mar 16, 2024
910d63e
[DebugInfo] Remove conflicting debug info in switch
Snowy1803 Mar 18, 2024
69b226b
[SILVerifier] Add detection of conflicting debug variables
Snowy1803 Mar 18, 2024
260f477
Merge pull request #72565 from hborla/6.0-dispatch-main-actor
hborla Mar 26, 2024
c7a5368
adjust infinite type substitution workaround
kavon Mar 26, 2024
fb24ebe
Merge pull request #72560 from kubamracek/cp-6.0-embedded-specialize-…
kubamracek Mar 26, 2024
6d3f5e5
SIL: fix runtime effect of copy_addr of trivial types
eeckstein Mar 18, 2024
869b801
[embedded] Add swift_isUniquelyReferenced_native into the embedded ru…
kubamracek Mar 25, 2024
6adae95
[6.0] 🍒 Disable tracing in xpcproxy
tbkka Mar 26, 2024
2a033de
SwiftCompilerSources: Add append methods to SingleInlineArray.
atrick Mar 15, 2024
bed3a9c
Add SILType::containsNoEscapeFunction()
atrick Mar 16, 2024
f032f27
Add computeKnownLiveness utility
atrick Mar 15, 2024
af3c29c
Add a comment in LifetimeDependenceUseDefWalker.
atrick Mar 15, 2024
080fff1
LifetimeDependenceUtils comment clarification and cleanup.
atrick Mar 18, 2024
5a26081
Handle ConvertEscapeToNoEscapeInst in NonEscapingClosureDefUseWalker
atrick Mar 16, 2024
78b969c
Disable verbose AddressUtils
atrick Mar 19, 2024
e4bd866
Disable verbose LifetimeDependenceUtils
atrick Mar 19, 2024
0dbfdc9
LifetimeDependenceScopeFixup logging
atrick Mar 16, 2024
6a3f2bd
LocalVariableUtils logging
atrick Mar 16, 2024
dceff4a
ForwardingUtils logging
atrick Mar 16, 2024
a7a6cc5
Handle escaping addresses in LocalVariableAccessWalker
atrick Mar 16, 2024
df61e7e
LocalVariableUtils logging
atrick Mar 16, 2024
3f92d53
ClosureLifetimeFixup; emit mark_dependence [nonescaping].
atrick Mar 18, 2024
e996ff2
AddressUseVisitor: follow mark_dependence [nonescaping].
atrick Mar 18, 2024
bc2b7da
Add a lifetime dependence test case for nonescaping closures.
atrick Mar 18, 2024
c17acf4
Merge pull request #72573 from tshortli/has-retroactive-attribute-6.0
tshortli Mar 26, 2024
d6a8987
[region-isolation] Remove redundant test transfernonsendable_globalac…
gottesmm Mar 16, 2024
f39ce01
[region-isolation] Add a test specifically for ownership.
gottesmm Mar 18, 2024
c909cb9
[region-isolation] Rename callback handleFailure -> handleLocalUseAft…
gottesmm Mar 17, 2024
cd307f9
[ast] Add a helper method ActorIsolation::getActorOrNullPtr().
gottesmm Mar 18, 2024
8b2a16f
[region-isolation] Move ValueIsolationRegionInfo from RegionAnalysis.…
gottesmm Mar 18, 2024
d4400cb
[region-isolation] Define getIsolationRegionInfo(Element elt) on Part…
gottesmm Mar 18, 2024
992c0d9
[region-isolation] Change named transfer non transferable error to us…
gottesmm Mar 18, 2024
b49bbeb
[region-isolation] Rename ValueIsolationRegionInfo -> IsolationRegion…
gottesmm Mar 18, 2024
edeb3f8
Update a test I missed
gottesmm Mar 18, 2024
b4a14a5
Add include <variant> in a place that I missed.
gottesmm Mar 18, 2024
efd48cf
[region-isolation] Remove variable_defined_here from named use after …
gottesmm Mar 19, 2024
782340c
[region-isolation] Teach variable_name_inference how to infer through…
gottesmm Mar 19, 2024
9ea61cc
[region-isolation] Teach variable name utils how to handle more tuple…
gottesmm Mar 19, 2024
a51678f
[cmake] Prevent linker errors by linking libswiftAST into SwiftBasicT…
gottesmm Mar 21, 2024
b1ba9b5
[region-isolation] Convert TransferringOperand to be a bump allocated…
gottesmm Mar 19, 2024
3972f96
[ast] Implement ActorIsolation::Profile(...).
gottesmm Mar 20, 2024
93238e7
[ast] Improve the debug dump for ActorIsolation.
gottesmm Mar 20, 2024
242cabb
[region-isolation] Move IsolationRegionInfo higher up in PartitionUti…
gottesmm Mar 20, 2024
de7a82d
[region-isolation] Define an == on IsolationRegionInfo.
gottesmm Mar 20, 2024
0309c44
[region-isolation] Add ability to Profile an IsolationRegionInfo.
gottesmm Mar 20, 2024
6b2ecfd
[region-isolation] Refactor RegionAnalysis AST pattern matching onto …
gottesmm Mar 20, 2024
e1d5604
[region-isolation] Refactor out dynamic getIsolationRegionInfo for an…
gottesmm Mar 20, 2024
54b4efb
[region-isolation] Rename IsolationRegionInfo -> SILIsolationInfo.
gottesmm Mar 20, 2024
8c98af9
[region-isolation] Add a helper for getting an ApplyIsolationCrossing…
gottesmm Mar 20, 2024
9d9316e
[region-isolation] Remove an assert that doesnt add anything.
gottesmm Mar 20, 2024
43003a9
[region-isolation] Move computation of SILIsolationInfo for a SILFunc…
gottesmm Mar 20, 2024
0beac1c
[region-isolation] Use SILRegionInfo::get to compute actor isolation …
gottesmm Mar 20, 2024
9e74a56
Fix unittest
gottesmm Mar 21, 2024
5ca0f27
Revert "[cmake] Prevent linker errors by linking libswiftAST into Swi…
gottesmm Mar 21, 2024
80208d6
Instead of linking libswiftAST into SwiftBasicTests, define ActorIsol…
gottesmm Mar 21, 2024
4a1686e
[region-isolation] Clean up use after transfer error to use the dynam…
gottesmm Mar 21, 2024
2fc1aff
[region-isolation] Wordsmith "{access,use} here could race".
gottesmm Mar 24, 2024
9c9d818
[transferring] Implement swift_attr support for transferring results …
gottesmm Mar 22, 2024
203a013
[region-isolation] Add a named variant of the use after pass via stro…
gottesmm Mar 24, 2024
b71970b
[region-isolation] Add a named variant of the transfer via closure ca…
gottesmm Mar 24, 2024
8b7a173
[region-isolation] Convert the isolation having autoclosure expr erro…
gottesmm Mar 24, 2024
6f4e337
Update a test I missed
gottesmm Mar 24, 2024
345b65a
[region-isolation] Shrink PartitionUtils.h by moving large functions …
gottesmm Mar 24, 2024
3e47fe2
[region-isolation] Change printing of values before dataflow to dump …
gottesmm Mar 25, 2024
dce9ccf
[region-isolation] Change a test to use the name "CustomActor" instea…
gottesmm Mar 25, 2024
3ea42ff
[region-isolation] When emitting an error for an isolated closure use…
gottesmm Mar 25, 2024
c90e2e5
[region-isolation] Change the transfer non-transferrable value due to…
gottesmm Mar 25, 2024
fa2cc90
[region-isolation] If a value is dynamically actor isolated, do not c…
gottesmm Mar 25, 2024
cbf57c9
[region-isolation] Squelch use after transfer if the use has effectiv…
gottesmm Mar 26, 2024
dacc4b0
[region-isolation] Do not squelch errors in the unittests.
gottesmm Mar 26, 2024
bda5952
Merge pull request #72580 from kavon/6.0-fix-infinite-subst
kavon Mar 26, 2024
a5c10d9
Merge pull request #72576 from Snowy1803/6.0-verifier-conflicting-deb…
adrian-prantl Mar 26, 2024
8004d4a
Merge pull request #72562 from kubamracek/cp-6.0-embedded-keypaths
kubamracek Mar 26, 2024
b050dd7
[Preset] Disable verify dwarf for toolchain preset
shahmishal Mar 21, 2024
8f8c366
Rename dsymutil-args to extra-dsymutil-args
shahmishal Mar 26, 2024
ce9feb5
Merge pull request #72554 from edymtt/edymtt/add-flag-to-pass-argumen…
shahmishal Mar 27, 2024
67055e1
Merge pull request #72593 from tbkka/tbkka-6.0-rdar124996590
tbkka Mar 27, 2024
43aedb1
Merge pull request #72589 from kubamracek/cp-6.0-embedded-isUniquelyR…
kubamracek Mar 27, 2024
c1af20b
Merge pull request #72597 from atrick/60-pointer-escape-bailout
atrick Mar 27, 2024
c5198dd
LifetimeDependence cleanup logging
atrick Mar 19, 2024
e6792ab
LifetimeDependence stored property unit tests
atrick Mar 19, 2024
b56c901
LifetimeDependenceUtils: cleanup Scope initialization.
atrick Mar 20, 2024
815c660
Add AccessBase.storeBorrow.
atrick Mar 20, 2024
1b62e78
Fix CapturePromotion handling of mark_dependence
atrick Mar 20, 2024
2e9c6c7
Fix visitNonEscapingLifetimeEnds to handle mark_dependence uses
atrick Mar 22, 2024
76f4f49
Add a test case for mark_dependence with stored uses.
atrick Mar 21, 2024
cd6dba5
Add a test case for generic ~Escapable initialization.
atrick Mar 21, 2024
67fd13f
Merge pull request #72581 from eeckstein/copy-addr-effect-6.0
eeckstein Mar 27, 2024
1d6070f
Merge pull request #72567 from eeckstein/fix-pred-dead-alloc-elim-6.0
eeckstein Mar 27, 2024
bc022d1
Merge pull request #72611 from atrick/60_markdep_escape
atrick Mar 27, 2024
3823350
Merge pull request #72425 from apple/ApolloZhu/6.0/const-extract/exte…
ApolloZhu Mar 27, 2024
c8270d0
Merge pull request #72584 from gottesmm/release/6.0-region-iso
gottesmm Mar 27, 2024
e1ca80a
Merge pull request #72602 from apple/disable-verify-dwarf-swift-6.0
shahmishal Mar 27, 2024
81fc10a
Frontend: Allow any experimental feature to be enabled when compiling…
tshortli Mar 27, 2024
2944ae8
[BitwiseCopyable] Loosen validation assertion.
nate-chandler Mar 26, 2024
2424e74
[BitwiseCopyable] Loosen validation assertion.
nate-chandler Mar 27, 2024
6f5fc1f
Merge pull request #72637 from tshortli/allow-non-production-features…
tshortli Mar 28, 2024
7d89bbf
Merge pull request #72639 from nate-chandler/cherrypick/release/6.0/r…
nate-chandler Mar 28, 2024
4434228
Serialization: Remove serialization support for @_allowFeatureSuppres…
tshortli Mar 26, 2024
3703131
AST: Introduce `@_disallowFeatureSuppression` attribute.
tshortli Mar 27, 2024
7d0dcf2
Runtime: Fix a -Wlogical-op-parentheses warning.
tshortli Mar 27, 2024
26569e0
stdlib: Make typed throws ABI placeholders properly `@usableFromInline`.
tshortli Mar 26, 2024
abc42e8
Concurrency: Declare explicit Failure typealiases on AsyncSequence it…
tshortli Mar 28, 2024
9c37687
Frontend: Introduce an alias for the NoncopyableGenerics experimental…
tshortli Mar 27, 2024
747fda0
AST: Adjust declaration printing when NoncopyableGenerics2 is suppres…
tshortli Mar 27, 2024
dc998bb
stdlib: Adopt `@_disallowFeatureSuppression(NoncopyableGenerics)`.
tshortli Mar 27, 2024
3607096
tests: Un-XFAIL some CxxInterop tests that pass now.
tshortli Mar 27, 2024
aa43d60
Frontend: Introduce an alias for the IsolatedAny experimental feature.
tshortli Mar 28, 2024
bf71bbf
Merge pull request #72613 from tshortli/ncgenerics-typedthrows-condfa…
tshortli Mar 28, 2024
7ded851
Move lifetime diagnostics after consume operator diagnostics.
atrick Mar 24, 2024
9e8c787
Update tests to use ~Escapable syntax.
atrick Mar 25, 2024
bdeff64
Add more lifetime_dependence test for stored properties.
atrick Mar 25, 2024
482c614
Fix MoveOnlyDiagnostics, ConsumOperator...Checkers diagnostics
atrick Mar 25, 2024
bfde3dc
Fix LifetimeDependenceDiagnostics to ignore closure captures
atrick Mar 27, 2024
db4de5d
Unit test lifetime dependent diagnostics for nonescaping capture
atrick Mar 27, 2024
911f745
Always-enable lifetime-depenence diagnostics.
atrick Mar 27, 2024
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
  •  
  •  
  •  
237 changes: 2 additions & 235 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,235 +1,2 @@
# Lines starting with '#' are comments.
# Each line is a case-sensitive file pattern followed by one or more owners.
# Order is important. The last matching pattern has the most precedence.
# More information: https://docs.github.com/en/articles/about-code-owners
#
# Please mirror the repository's file hierarchy in case-sensitive lexicographic
# order.

# TODO: /.clang-format

/.clang-tidy @egorzhdan

# TODO: /.dir-locals.el
# TODO: /.flake8
# TODO: /.gitattributes

# .github
/.github/ @shahmishal
/.github/CODEOWNERS @AnthonyLatsis @shahmishal
/.github/ISSUE_TEMPLATE/ @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin
/.github/PULL_REQUEST_TEMPLATE.md @AnthonyLatsis @hborla @LucianoPAlmeida @shahmishal @xedin

# TODO: /.gitignore
# TODO: /.mailmap
# TODO: /Brewfile
# TODO: /CHANGELOG.md
# TODO: /CMakeLists.txt
# TODO: /CODE_OF_CONDUCT.md
# TODO: /CODE_OWNERS.TXT
# TODO: /CONTRIBUTING.md
# TODO: /LICENSE.txt
# TODO: /README.md

# SwiftCompilerSources
/SwiftCompilerSources @eeckstein

# apinotes
# TODO: /apinotes

# benchmark
# TODO: /benchmark

# bindings
# TODO: /bindings

# cmake
/cmake/**/*Windows* @compnerd

# docs
/docs/Generics.rst @slavapestov
/docs/Generics/ @slavapestov
/docs/HowToGuides/ @AnthonyLatsis @LucianoPAlmeida @xedin

# include
/include/swift/AST/ @hborla @slavapestov @xedin
/include/swift/AST/*Availability* @tshortli
/include/swift/AST/*Conformance* @slavapestov
/include/swift/AST/*Distributed* @ktoso
/include/swift/AST/*Generic* @hborla @slavapestov
/include/swift/AST/*Protocol* @hborla @slavapestov
/include/swift/AST/*Requirement* @hborla @slavapestov
/include/swift/AST/*Substitution* @slavapestov
/include/swift/AST/Evaluator* @CodaFi @slavapestov
/include/swift/AST/DiagnosticsParse.def @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
/include/swift/ClangImporter @zoecarver @hyp @egorzhdan
/include/swift/DependencyScan @artemcm
/include/swift/Driver @artemcm
# TODO: /include/swift/IRGen/
/include/swift/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
/include/swift/Index/ @ahoppen @bnbarham @hamishknight @rintaro
/include/swift/Option/*Options* @tshortli
/include/swift/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
/include/swift/PrintAsClang @zoecarver @hyp @egorzhdan
/include/swift/Refactoring @ahoppen @bnbarham @hamishknight @rintaro
# TODO: /include/swift/SIL/
# TODO: /include/swift/SILOptimizer/
/include/swift/SIL/*Coverage* @ahoppen @bnbarham @hamishknight @rintaro
/include/swift/SIL/SILProfiler.h @ahoppen @bnbarham @hamishknight @rintaro
/include/swift/SIL/SILDebug* @adrian-prantl
/include/swift/SILOptimizer/Utils/Distributed* @ktoso
/include/swift/Sema/ @hborla @slavapestov @xedin
/include/swift/Sema/CS* @hborla @xedin
/include/swift/Sema/Constraint* @hborla @xedin
/include/swift/SymbolGraphGen/ @QuietMisdreavus
/include/swift/Threading @al45tair

# lib
/lib/AST/ @hborla @slavapestov @xedin
/lib/AST/*Availability* @tshortli
/lib/AST/ASTPrinter.cpp @hborla @slavapestov @xedin @tshortli
/lib/AST/*Conformance* @slavapestov
/lib/AST/*Generic* @hborla @slavapestov
/lib/AST/*Requirement* @hborla @slavapestov
/lib/AST/*Substitution @slavapestov
/lib/AST/Evaluator* @CodaFi @slavapestov
/lib/AST/ModuleLoader.cpp @artemcm
/lib/AST/RequirementMachine/ @slavapestov
/lib/ASTGen/ @ahoppen @bnbarham @CodaFi @hamishknight @rintaro
/lib/Basic/Windows @compnerd
/lib/ClangImporter @zoecarver @hyp @egorzhdan
/lib/ClangImporter/DWARFImporter* @adrian-prantl
/lib/DependencyScan @artemcm
/lib/Driver @artemcm
/lib/DriverTool/autolink_extract_main.cpp @MaxDesiatov @etcwilde
/lib/DriverTool/swift_symbolgraph_extract_main.cpp @QuietMisdreavus
/lib/Frontend/*ModuleInterface* @artemcm @tshortli
# TODO: /lib/IRGen/
/lib/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
/lib/IDETool/ @ahoppen @bnbarham @hamishknight @rintaro
/lib/IRGen/*Coverage* @ahoppen @bnbarham @hamishknight @rintaro
/lib/IRGen/*Debug* @adrian-prantl
/lib/IRGen/*Distributed* @ktoso
/lib/Index/ @ahoppen @bnbarham @hamishknight @rintaro
/lib/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
/lib/PrintAsClang @zoecarver @hyp @egorzhdan
/lib/Refactoring/ @ahoppen @bnbarham @hamishknight @rintaro
# TODO: /lib/SIL/
/lib/SIL/IR/*Coverage* @ahoppen @bnbarham @hamishknight @rintaro
/lib/SIL/IR/SILProfiler.cpp @ahoppen @bnbarham @hamishknight @rintaro
/lib/SIL/IR/SILDebug* @adrian-prantl
/lib/SIL/IR/SILLocation* @adrian-prantl
# TODO: /lib/SILGen/
/lib/SILGen/*Distributed* @ktoso
# TODO: /lib/SILOptimizer/
/lib/SILOptimizer/Mandatory/FlowIsolation.cpp @kavon
/lib/SILOptimizer/Mandatory/ConsumeOperator* @kavon
/lib/SILOptimizer/Mandatory/MoveOnly* @kavon
/lib/SILOptimizer/Utils/Distributed* @ktoso
/lib/Sema/ @hborla @slavapestov @xedin
/lib/Sema/*Availability* @tshortli
/lib/Sema/CS* @hborla @xedin
/lib/Sema/CodeSynthesisDistributed* @hborla @ktoso
/lib/Sema/Constraint* @hborla @xedin
/lib/Sema/DerivedConformance* @slavapestov
/lib/Sema/DerivedConformanceDistributed* @ktoso @slavapestov
/lib/Sema/TypeCheckDistributed* @hborla @ktoso @xedin
/lib/Sema/TypeCheckProtocol* @AnthonyLatsis @hborla @slavapestov
/lib/Sema/TypeCheckType* @AnthonyLatsis @hborla @slavapestov @xedin
/lib/Serialization/SerializedModuleLoader.cpp @artemcm
/lib/SymbolGraphGen @QuietMisdreavus
/lib/Threading @al45tair

# localization
# TODO: /localization

# stdlib
/stdlib/ @apple/standard-librarians
/stdlib/public/Backtracing/ @al45tair
/stdlib/public/Concurrency/ @ktoso
/stdlib/public/Cxx/ @zoecarver @hyp @egorzhdan
/stdlib/public/Distributed/ @ktoso
/stdlib/public/Observation/ @phausler
/stdlib/public/Threading/ @al45tair
/stdlib/public/Windows/ @compnerd
/stdlib/public/libexec/swift-backtrace/ @al45tair
/stdlib/public/runtime/ @mikeash @al45tair

# test
/test/ASTGen/ @ahoppen @bnbarham @CodaFi @hamishknight @rintaro
/test/Concurrency/ @ktoso
/test/Constraints/ @hborla @xedin
/test/DebugInfo/ @adrian-prantl
/test/Distributed/ @ktoso
/test/Driver/ @artemcm
/test/Driver/static* @MaxDesiatov @etcwilde
/test/Generics/ @hborla @slavapestov
/test/Generics/inverse* @kavon
# TODO: /test/IRGen/
/test/IDE/ @ahoppen @bnbarham @hamishknight @rintaro
/test/Index/ @ahoppen @bnbarham @hamishknight @rintaro
/test/Interop/ @zoecarver @hyp @egorzhdan
/test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
/test/Profiler @ahoppen @bnbarham @hamishknight @rintaro
# TODO: /test/SIL/
# TODO: /test/SILGen/
# TODO: /test/SILOptimizer/
/test/SILOptimizer/moveonly* @kavon
/test/SILOptimizer/noimplicitcopy* @kavon
/test/ScanDependencies/ @artemcm
/test/Sema/ @hborla @slavapestov @xedin
/test/Sema/moveonly* @kavon
/test/SourceKit/ @ahoppen @bnbarham @hamishknight @rintaro
/test/SymbolGraph/ @QuietMisdreavus
/test/abi/ @apple/standard-librarians
/test/decl/ @hborla @slavapestov
/test/decl/protocol/ @AnthonyLatsis @hborla @slavapestov
# FIXME: This file could have a dedicated directory.
/test/decl/protocol/special/DistributedActor.swift @ktoso
/test/expr/ @hborla @slavapestov @xedin
/test/refactoring/ @ahoppen @bnbarham @hamishknight @rintaro
/test/stdlib/ @apple/standard-librarians
/test/stmt/ @hborla @xedin
/test/type/ @hborla @slavapestov @xedin

# tools
# TODO: /tools
/tools/SourceKit @ahoppen @bnbarham @hamishknight @rintaro
/tools/lldb-moduleimport-test/ @adrian-prantl
/tools/swift-ide-test @ahoppen @bnbarham @hamishknight @rintaro
/tools/swift-inspect @mikeash @al45tair @compnerd
/tools/swift-refactor @ahoppen @bnbarham @hamishknight @rintaro

# unittests
/unittests/AST/ @hborla @slavapestov @xedin
/unittests/AST/*Evaluator* @CodaFi @slavapestov
/unittests/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
# TODO: /unittests/SIL/
/unittests/Sema/ @hborla @xedin
/unittests/SourceKit/ @ahoppen @bnbarham @rintaro @hamishknight

# userdocs
# TODO: /userdocs

# utils
/utils/*windows* @compnerd
/utils/gyb_sourcekit_support/ @ahoppen @bnbarham @hamishknight @rintaro
/utils/sourcekit_fuzzer/ @ahoppen @bnbarham @hamishknight @rintaro
/utils/swift_build_support/products/earlyswiftsyntax.py @ahoppen @bnbarham @hamishknight @rintaro
/utils/swift_build_support/products/skstresstester.py @ahoppen @bnbarham @hamishknight @rintaro
/utils/swift_build_support/products/sourcekitlsp.py @ahoppen @bnbarham @hamishknight @rintaro
/utils/swift_build_support/products/swiftformat.py @ahoppen @allevato @bnbarham @hamishknight @rintaro
/utils/swift_build_support/products/swiftsyntax.py @ahoppen @bnbarham @hamishknight @rintaro
/utils/update-checkout* @shahmishal
/utils/update_checkout/ @shahmishal
/utils/vim/ @compnerd

# validation-test
# TODO: /validation-test/IRGen/
/validation-test/IDE/ @ahoppen @bnbarham @rintaro @hamishknight
/validation-test/Parse/ @ahoppen @bnbarham @CodaFi @DougGregor @hamishknight @rintaro
# TODO: /validation-test/SIL/
# TODO: /validation-test/SILGen/
# TODO: /validation-test/SILOptimizer/
/validation-test/Sema/ @hborla @slavapestov @xedin
/validation-test/stdlib/ @apple/standard-librarians
# For the release branch @apple/swift5-branch-managers needs to approve the changes
* @apple/swift5-branch-managers
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@
> This is in reverse chronological order, so newer entries are added to the top.

## Swift 6.0

* Swift 5.10 missed a semantic check from [SE-0309][]. In type context, a reference to a
protocol `P` that has associated types or `Self` requirements should use
the `any` keyword, but this was not enforced in nested generic argument positions.
This is now an error as required by the proposal:

```swift
protocol P { associatedtype A }
struct Outer<T> { struct Inner<U> { } }
let x = Outer<P>.Inner<P>() // error
```
To correct the error, add `any` where appropriate, for example
`Outer<any P>.Inner<any P>`.

* Swift 5.10 accepted certain invalid opaque return types from [SE-0346][].
If a generic argument of a constrained opaque return type did not
satisfy the requirements on the primary associated type, the generic
argument was silently ignored and type checking would proceed as if it
weren't stated. This now results in a diagnostic:

```swift
protocol P<A> { associatedtype A: Sequence }
struct G<A: Sequence>: P {}

func f() -> some P<Int> { return G<Array<Int>>() } // error
```

The return type above should be written as `some P<Array<Int>>` to match
the return statement. The old broken behavior in this situation can also
be restored, by removing the erroneous constraint and using the more general
upper bound `some P`.

* [SE-0408][]:
A `for`-`in` loop statement can now accept a pack expansion expression,
enabling iteration over the elements of its respective value pack. This form
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,6 @@ option(SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED
"Enable experimental distributed actors and functions"
FALSE)

option(SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS
"Enable experimental NoncopyableGenerics"
FALSE)

option(SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES
"Enable experimental NonescapableTypes"
FALSE)
Expand Down Expand Up @@ -1278,7 +1274,6 @@ if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
message(STATUS "Differentiable Programming Support: ${SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING}")
message(STATUS "Concurrency Support: ${SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY}")
message(STATUS "Distributed Support: ${SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED}")
message(STATUS "NoncopyableGenerics Support: ${SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS}")
message(STATUS "NonEscapableTypes Support: ${SWIFT_ENABLE_EXPERIMENTAL_NONESCAPABLE_TYPES}")
message(STATUS "String Processing Support: ${SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING}")
message(STATUS "Backtracing Support: ${SWIFT_ENABLE_BACKTRACING}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import SIL

private let verbose = false

private func log(_ message: @autoclosure () -> String) {
private func log(prefix: Bool = true, _ message: @autoclosure () -> String) {
if verbose {
print("### \(message())")
print((prefix ? "### " : "") + message())
}
}

Expand All @@ -29,10 +29,7 @@ private func log(_ message: @autoclosure () -> String) {
let lifetimeDependenceDiagnosticsPass = FunctionPass(
name: "lifetime-dependence-diagnostics")
{ (function: Function, context: FunctionPassContext) in
if !context.options.hasFeature(.NonescapableTypes) {
return
}
log(" --- Diagnosing lifetime dependence in \(function.name)")
log(prefix: false, "\n--- Diagnosing lifetime dependence in \(function.name)")
log("\(function)")

for argument in function.arguments
Expand All @@ -45,7 +42,7 @@ let lifetimeDependenceDiagnosticsPass = FunctionPass(
}
}
for instruction in function.instructions {
if let markDep = instruction as? MarkDependenceInst {
if let markDep = instruction as? MarkDependenceInst, markDep.isUnresolved {
if let lifetimeDep = LifetimeDependence(markDep, context) {
analyze(dependence: lifetimeDep, context)
}
Expand Down Expand Up @@ -297,6 +294,8 @@ private struct LifetimeVariable {
// TODO: bridge VarDecl for FunctionConvention.Yields
self.varDecl = nil
self.sourceLoc = result.parentInstruction.location.sourceLoc
case .storeBorrow(let sb):
self = .init(dependent: sb.source, context)
case .pointer(let ptrToAddr):
self.varDecl = nil
self.sourceLoc = ptrToAddr.location.sourceLoc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,16 @@ import SIL

private let verbose = false

private func log(_ message: @autoclosure () -> String) {
private func log(prefix: Bool = true, _ message: @autoclosure () -> String) {
if verbose {
print("### \(message())")
print((prefix ? "### " : "") + message())
}
}

let lifetimeDependenceInsertionPass = FunctionPass(
name: "lifetime-dependence-insertion")
{ (function: Function, context: FunctionPassContext) in
if !context.options.hasFeature(.NonescapableTypes) {
return
}
log(" --- Inserting lifetime dependence markers in \(function.name)")
log(prefix: false, "\n--- Inserting lifetime dependence markers in \(function.name)")

for instruction in function.instructions {
if let dependentApply = LifetimeDependentApply(instruction) {
Expand Down
Loading