Commit Graph

22435 Commits

Author SHA1 Message Date
Pavel Yaskevich
6465bdc6e1 Merge pull request #76042 from xedin/rdar-133415157
[Sema/SILGen] Emit dynamic actor isolation checks for closures
2024-08-28 13:06:55 -07:00
Hamish Knight
1cb0f8fdd5 [AST] Rename isPrivateStdlibDecl -> isPrivateSystemDecl
This better reflects what we're actually checking
here.
2024-08-28 18:31:51 +01:00
Egor Zhdan
0ab681514b [cxx-interop] Add CxxMutableRandomAccessCollection protocol
This conforms mutable C++ container types, such as `std::vector`, to `MutableCollection` via a new overlay protocol `CxxMutableRandomAccessCollection`.

rdar://134531554
2024-08-28 12:43:42 +01:00
Allan Shortlidge
185022cbb5 SILGen: Only skip decls nested in functions when the function is skipped.
If a function body is emitted, all of the declarations inside that function
body must be emitted, too. Previously, lazy var initializers were being skipped
regardless of whether the function containing them was skipped, resulting in
SIL verification errors (which were correctly predicting linker errors).

Resolves rdar://134708502.
2024-08-27 14:29:08 -07:00
swift-ci
39eb10e089 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-27 11:35:03 -07:00
Steven Wu
d53f4fc3fc Merge pull request #76088 from cachemeifyoucan/eng/PR-134593841
[Caching] CASFS need to include blocklist
2024-08-27 11:16:06 -07:00
swift-ci
97f2c34604 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-27 08:14:27 -07:00
Hamish Knight
2fdf43a6fd Merge pull request #76057 from hamishknight/platform
[AST] Treat platform modules as non-user
2024-08-27 16:03:38 +01:00
Nate Chandler
7600794838 [LifetimeCompletion] Enable.
Now that the compile time regressions observed in rdar://132552637 are
fixed, enable completion of lifetimes during the SILGenCleanup.
2024-08-26 16:24:57 -07:00
Nate Chandler
2e348c7065 [Gardening] Clarify SILOptions flag docs.
Specifically, those pertaining to lifetime completion.
2024-08-26 14:56:25 -07:00
Steven Wu
fd6707e312 [Caching] CASFS need to include blocklist
There are blocklist items can affect code-generation, thus the
block-list needs to be included in the CASFS for compilation.

rdar://134593841
2024-08-26 11:49:42 -07:00
swift-ci
a5d12a6c87 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-25 03:44:58 -07:00
Doug Gregor
225e562dda Requestify the #if computation using SwiftIfConfig
We're not caching this now, but it lets us dodge annoying layering
issues because ASTGen (where this is available) sits on top of the C++
parser, which needs to call it.
2024-08-24 21:31:41 -07:00
swift-ci
d1f642c28f Merge remote-tracking branch 'origin/main' into rebranch 2024-08-24 19:34:29 -07:00
Michael Gottesman
da597be76d Merge pull request #76075 from gottesmm/rdar133531625
[region-isolation] Treat as Sendable values that are meant to be ignored since they are marked with preconcurrency
2024-08-24 22:26:00 -04:00
swift-ci
ee0d59cc91 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-24 12:35:16 -07:00
Slava Pestov
8315120eaf Merge pull request #76051 from slavapestov/archetype-get-parent
AST: Remove ArchetypeType::getParent()
2024-08-24 15:31:01 -04:00
Mykola Pokhylets
6fa62f721e Revert allowing @preconcurrency on deinit declarations
Magically fixed
2024-08-24 11:01:17 +02:00
Michael Gottesman
bbc4816861 [sema] Move getConcurrencyDiagnosticBehaviorLimit and hasExplicitSendableConformance out of Sema and into libAST.
I am going to expose this on TypeBase, so I am attempting to prevent a layering
violation in between AST and Sema.
2024-08-23 20:42:51 -04:00
Slava Pestov
4d2b4f4b73 AST: Remove ArchetypeType::getParent() 2024-08-23 16:45:03 -04:00
Slava Pestov
a275780bdb AST: Simplify SubstitutionMap::lookupSubstitution() 2024-08-23 16:45:03 -04:00
Slava Pestov
cf784f980e AST: Remove SubstFlags::AllowLoweredTypes 2024-08-23 13:14:05 -04:00
Hamish Knight
940f5f7c2a [AST] Treat platform modules as non-user
Modules defined within the SDK are considered
non-user modules, extend this to any module found
within the parent platform directory if there is
one. This ensures we include modules such as
XCTest and Testing.

rdar://131854240
2024-08-23 14:23:37 +01:00
swift-ci
e28f413b76 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-22 20:14:24 -07:00
Slava Pestov
76ec490119 AST: Split up remaining cases of TypeSubstituter::transform()
Also rename and reformat a few things added recently.
2024-08-22 18:42:19 -04:00
Slava Pestov
da4d076f02 AST: Introduce SubstFlags::SubstitutePrimaryArchetypes 2024-08-22 18:41:14 -04:00
Allan Shortlidge
4420ea853b Sema: Check availability of conformance type witnesses.
The type satisfying a protocol requirement must be at least as available as the
associated type for the requirement.

Resolves rdar://134093006
2024-08-22 15:23:21 -07:00
Allan Shortlidge
11304b7804 AST: Take decls instead of identifiers in some conformance diagnostics.
NFC.
2024-08-22 13:57:32 -07:00
Michael Gottesman
f075e4eb28 Change DiagnosticBehavior into a struct enum so we can put methods on it.
The reason why I am making this change is because I want to put a merge
operation on DiagnosticBehavior. This merge operation allows for
DiagnosticBehavior to work like a lattice. When one merges, one moves
potentially from fatal, error to things like note, ignore.
2024-08-22 15:59:04 -04:00
Pavel Yaskevich
a4d9b3b5b2 [AST] Add a bit to closure expr to indiciate whether it requires dynamic isolation checking
This is an important information for closures because the compiler
might need to emit dynamic actor isolation checks in some circumstances
(i.e. when a closure is isolated and passed to a not fully concurrency
checked API).
2024-08-22 09:57:06 -07:00
swift-ci
044d998736 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-22 06:34:17 -07:00
Slava Pestov
07b697e178 Merge pull request #76030 from slavapestov/open-existential-get
AST: Remove OpenedArchetypeType::get() overload taking an interface type
2024-08-22 09:32:57 -04:00
swift-ci
a5c1ba732f Merge remote-tracking branch 'origin/main' into rebranch 2024-08-22 04:33:40 -07:00
Konrad `ktoso` Malawski
1861375f88 [Concurrency] Suggest adding a method, when mutating actor property cross isolation (#75922) 2024-08-22 20:24:39 +09:00
swift-ci
e27edcada1 Merge remote-tracking branch 'origin/main' into rebranch 2024-08-21 16:49:14 -07:00
Slava Pestov
e9b6f0b82d AST: Remove OpenedArchetypeType::get() overload taking an interface type 2024-08-21 19:47:30 -04:00
Slava Pestov
863afad0a2 Merge pull request #75947 from slavapestov/type-subst-rework-2
Type::subst() rework, part 2
2024-08-21 19:31:08 -04:00
Slava Pestov
8e256d9045 AST: Remove TypeBase::getRootOpenedExistentials() 2024-08-21 14:23:38 -04:00
Slava Pestov
39b4bda1dc AST: Introduce SubstFlags::SubstituteLocalArchetypes 2024-08-21 14:23:37 -04:00
Slava Pestov
68dca61dd0 AST: Use TypeTransform::transformGenericTypeParam() to transform GenericTypeParamType 2024-08-21 13:21:48 -04:00
Slava Pestov
d7ac12a56d AST: Use TypeTransform::transformDependentMember() to transform DependentMemberType 2024-08-21 13:21:48 -04:00
Slava Pestov
a4712d7208 AST: Use TypeTransform::transformPackElement() to transform PackElementType 2024-08-21 13:21:48 -04:00
Slava Pestov
3d64f8d122 AST: Use TypeTransform::transformPackExpansion() to transform PackExpansionType 2024-08-21 13:21:48 -04:00
Slava Pestov
575597dabe AST: Use TypeTransform::transformSubMap() to transform SILFunctionType 2024-08-21 13:21:48 -04:00
Slava Pestov
bbea8ec1a2 AST: Use TypeTransform::transformSubMap() to transform SILBoxType 2024-08-21 13:21:48 -04:00
Slava Pestov
074684fe06 AST: Use TypeTransform::transformSubMap() to transform TypeAliasType 2024-08-21 13:21:47 -04:00
Slava Pestov
ae77d6f0c1 AST: Replace one-off predicates with SubstitutionMap::getRecursiveProperties() 2024-08-21 13:19:10 -04:00
swift-ci
428ca50bbb Merge remote-tracking branch 'origin/main' into rebranch 2024-08-21 09:14:09 -07:00
Pavel Yaskevich
3df5e9c997 Merge pull request #75991 from xedin/rename-ispassedtosendingparameter
[AST] NFC: Rename `ParameterInfoList::isPassedToSendableParameter` to…
2024-08-21 09:14:00 -07:00
swift-ci
8e548d4fee Merge remote-tracking branch 'origin/main' into rebranch 2024-08-21 06:35:54 -07:00