Commit Graph

21693 Commits

Author SHA1 Message Date
Nate Chandler
98a2e6a7df [CoroutineAccessors] Added modify.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
Nate Chandler
66e6c59681 [Features] Added CoroutineAccessors. 2024-09-26 18:10:38 -07:00
swift-ci
feeba97fb2 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-26 17:49:11 -07:00
Steven Wu
82c9fdf68b [Blocklist] Make sure blocklist config is read through VFS
Make sure block-list file is read through VFS so CASFS can be used to
read the configuration to ensure sound caching, and also the path of the
blocklist can be canonicalized via path remapping.
2024-09-26 17:02:10 -07:00
Ben Barham
c15bc19946 Merge remote-tracking branch 'origin/main' into main-to-rebranch
Conflicts:
  - `lib/Serialization/ModuleFileSharedCore.cpp` new headers on main
2024-09-26 16:01:56 -07:00
Allan Shortlidge
d373036805 SE-0444: Promote MemberImportVisibility to an upcoming feature.
The proposal has been accepted, so `MemberImportVisibility` is no longer
experimental.

Resolves rdar://126284512.
2024-09-26 13:41:14 -07:00
eeckstein
8c5d7ee452 Merge pull request #76669 from eeckstein/class-existentials
embedded: support class existentials with generic classes
2024-09-26 07:37:35 +02:00
Nate Chandler
a215d726a7 [NFC] AST: Add StorageImpl.cpp.
And move a couple of StorageImplInfo member functions into it. In
preparation for making them use an ASTContext, to avoid importing that
header into StorageImpl.h, a lightweight header.
2024-09-25 21:11:22 -07:00
Nate Chandler
6bc2013df0 [NFC] ASTPrinter: Remove unneeded list resize.
Don't bother saving the previous ExcludeAttrList's size and restoring it
after execution when that list isn't modified.
2024-09-25 21:06:36 -07:00
Nate Chandler
ecba5db6e5 [NFC] AST: Added AccessorKind predicates.
And replaced direct comparisons with calls to predicates.  In
preparation for introducing parallel non-underscored accessors.
2024-09-25 21:06:36 -07:00
Doug Gregor
0aff85ced7 Emit mangled names for public symbols into the .swiftinterface
When the frontend option `-abi-comments-in-module-interface` is provided
during interface printing, the printed interface will contain
additional comments that provide the mangled names for public symbols.
This is an experiment in seeing how much information we can
meaningfully extract from a printed Swift interface for the purpose of
bridging with other languages.
2024-09-25 15:49:34 -07:00
Doug Gregor
77ed014690 Remove unused ASTMangler::mangleGlobalGetterEntity 2024-09-25 14:28:16 -07:00
Dmitrii Galimzianov
aa5e10f8d2 [Diagnostics] DeprecatedDeclaration group 2024-09-25 23:18:25 +02:00
Erik Eckstein
2950e4521e SIL: representation for specialized witness tables
The main change here is to associate a witness table with a `ProtocolConformance` instead of a `RootProtocolConformance`.
A `ProtocolConformance` is the base class and can be a `RootProtocolConformance` or a `SpecializedProtocolConformance`.
2024-09-25 19:32:08 +02:00
Steven Wu
fffe2cea19 Merge pull request #76591 from cachemeifyoucan/eng/PR-swift-macro-dep-tracking
[Macro][Dependencies] Properly model macro dependencies in the scanner
2024-09-25 09:41:45 -07:00
Steven Wu
74b93c5b33 Merge pull request #76687 from cachemeifyoucan/eng/PR-dead-code-removal
[NFC][ScanDependency] Remove some ununsed code
2024-09-25 09:35:08 -07:00
swift-ci
753b917274 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-25 05:36:07 -07:00
Slava Pestov
680541d892 Merge pull request #76682 from slavapestov/worse-than-best-solution
Sema: Check worseThanBestSolution() in a better place
2024-09-25 08:26:43 -04:00
Slava Pestov
bfc4f956fd Merge pull request #76662 from slavapestov/fine-grained-timers-flag
Add -fine-grained-timers flag
2024-09-25 08:26:08 -04:00
swift-ci
a0d7a9e5b8 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-24 19:19:27 -07:00
Steven Wu
5a6f6e1d4d [NFC][ScanDependency] Remove some ununsed code
Clean up some code that no longer used.
2024-09-24 16:29:21 -07:00
Slava Pestov
99d3bd88e3 AST: Don't produce 'any Copyable & Escapable' from TypeJoin::visitProtocolType() 2024-09-24 19:12:44 -04:00
Rintaro Ishizaki
c57025af67 Avoid #include AST headers in Basic headers
Resolve a layering violation. `DiagnosticBehavior` was used in
`LangOptions`. Introduce a dedicated 'enum' for the possible values.
2024-09-24 15:18:26 -07:00
swift-ci
5b6002caeb Merge remote-tracking branch 'origin/main' into rebranch 2024-09-24 01:55:37 -07:00
Allan Shortlidge
0fb36a5f39 AST: Make $SpecializeAttributeWithAvailability a baseline feature.
It has been available since at least Swift 5.8.
2024-09-23 21:48:09 -07:00
swift-ci
8c36f3215f Merge remote-tracking branch 'origin/main' into rebranch 2024-09-23 17:54:33 -07:00
Slava Pestov
c77fae3a2d Basic: Add -fine-grained-timers flag
By default, -stats-output-dir does not collect per-request timers and
counters, because of overhead.
2024-09-23 18:04:25 -04:00
Slava Pestov
fd2ab505d7 AST/Sema: Remove a couple of pointless FrontendStatsTracers
To get timings here, just use -fine-grained-timers.
2024-09-23 17:12:46 -04:00
Konrad `ktoso` Malawski
b9319d80f1 Merge branch 'main' into wip-experimental-isolated-deinit 2024-09-23 09:01:06 +09:00
Meghana Gupta
f8f043f585 Change @lifetime to always mean inherit lifetime dependence 2024-09-20 22:05:23 -07:00
Meghana Gupta
34782b750e Parse scoped lifetime dependence kind within the @lifetime attribute 2024-09-20 21:50:51 -07:00
Allan Shortlidge
f658648d51 Sema: Build TypeRefinementContexts correctly for multi-element enum cases.
Nodes in the TypeRefinementContext tree should be introduced for enum cases,
rather than enum elements, since its the cases that carry availability
annotations. Previously, enum cases in source that contained more than one
element would result in a malformed TRC tree that had overlapping sibling nodes
for each of the elements in a case declaration.
2024-09-20 15:29:22 -07:00
swift-ci
5e0b892e9e Merge remote-tracking branch 'origin/main' into rebranch 2024-09-20 13:09:36 -07:00
Slava Pestov
885d221417 Merge pull request #76585 from slavapestov/small-subst-cleanups-2
More type substitution cleanups
2024-09-20 15:59:04 -04:00
Slava Pestov
7042ee449d AST: Simplify TypeSubstituter::transformDependentMemberType() 2024-09-20 10:06:29 -04:00
Slava Pestov
e95ff011b3 AST: Fix invariant violation in swift::validateGenericSignature()
This is a silly "extended" verification check that we only exercise
in test/Generics/validate_stdlib_generic_signatures.swift.

We were taking a requirement containing unbound dependent member types
and applying a substitution map to it, which would result in an
ErrorType, so the requirement was always considered unsatisfied here
and the check was not as useful as it should have been.

Instead, re-implement a version of isRequirementSatisfied() that only
uses generic signature queries instead of substitution here.
2024-09-20 10:06:29 -04:00
Konrad `ktoso` Malawski
d89347bed0 Merge branch 'main' into wip-experimental-isolated-deinit 2024-09-20 18:34:45 +09:00
swift-ci
56bd686ccf Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 18:58:28 -07:00
Slava Pestov
4bb8f46d6d Merge pull request #76536 from slavapestov/small-subst-cleanups
Tiny optimization and cleanups
2024-09-19 21:36:51 -04:00
Steven Wu
e0541b0357 [Macro][Dependencies] Properly model macro dependencies in the scanner
Add function to handle all macro dependencies kinds in the scanner,
including taking care of the macro definitions in the module interface
for its client to use. The change involves:
  * Encode the macro definition inside the binary module
  * Resolve macro modules in the dependencies scanners, including those
    declared inside the dependency modules.
  * Propagate the macro defined from the direct dependencies to track
    all the potentially available modules inside a module compilation.
2024-09-19 16:41:53 -07:00
swift-ci
9bd7daddb9 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 15:14:52 -07:00
Sima Nerush
952ae45b3c Merge pull request #76395 from simanerush/global-actor-cut-off-119628202
[Concurrency] Allow `nonisolated` to prevent global actor inference.
2024-09-19 14:58:15 -07:00
swift-ci
ae4fee5d4e Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 13:54:31 -07:00
Doug Gregor
6039df3a34 Merge pull request #76565 from DougGregor/remove-if-config
Remove IfConfigDecl from the AST
2024-09-19 13:49:03 -07:00
Slava Pestov
7eecf97132 AST: Fix latent bug with GenericSignatureImpl::isRequirementSatisfied() 2024-09-19 14:18:34 -04:00
Slava Pestov
4a8b7bd003 AST: Sink SubstFlags::DesugarMemberTypes hack down into ProtocolConformance::getTypeWitness() 2024-09-19 14:18:34 -04:00
Slava Pestov
9afff03a1a AST: Re-implement ProtocolConformanceRef::getAssociatedConformance() as a primitive 2024-09-19 14:18:34 -04:00
Slava Pestov
a911693c8c AST: PackConformance::getAssociatedType() => getTypeWitness() 2024-09-19 14:18:34 -04:00
Slava Pestov
6928588dba AST: Gut ProtocolConformanceRef::getAssociatedType() 2024-09-19 14:18:34 -04:00
Slava Pestov
a27d6cf741 AST: Fold getMemberForBaseType() into TypeSubstituter::transformDependentMemberType() 2024-09-19 14:18:33 -04:00