Commit Graph

2062 Commits

Author SHA1 Message Date
Ben Barham
746517c9f2 Merge remote-tracking branch 'origin/main' into manually-merge-main-to-rebranch
Conflicts:
  - `test/IRGen/has_symbol.swift` test updates in rebranch. The new test
    will fail, will fix in the next commit.
2024-10-24 14:20:17 -07:00
Joe Groff
a184782a38 Introduce a Builtin.FixedArray type.
`Builtin.FixedArray<let N: Int, T: ~Copyable & ~Escapable>` has the layout of `N` elements of type `T` laid out
sequentially in memory (with the tail padding of every element occupied by the array). This provides a primitive
on which the standard library `Vector` type can be built.
2024-10-22 16:21:45 -07:00
swift-ci
ce9c86722d Merge remote-tracking branch 'origin/main' into rebranch 2024-10-12 11:34:21 -07:00
Hamish Knight
7c3f965578 Merge pull request #76979 from hamishknight/regex-request
Requestify regex pattern parsing
2024-10-12 19:19:09 +01:00
swift-ci
8a2edbc4c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-11 17:05:06 -07:00
nate-chandler
249831f9f3 Merge pull request #76942 from nate-chandler/general-coro/20240927/1
[CoroutineAccessors] SIL represents callee alloc.
2024-10-11 16:39:53 -07:00
Hamish Knight
6a435960b7 Requestify regex pattern parsing
Instead of doing the pattern parsing in both the
C++ parser and ASTGen, factor out the parsing into
a request that returns the pattern to emit, regex
type, and version. This can then be lazily run
during type-checking.
2024-10-11 19:25:58 +01:00
Nate Chandler
df1c4f6b25 [CoroutineAccessors] Add new SILFnTy CoroKind.
For `modify` and `read` coroutines, produce SILFunctionType's whose
coroutineKind is ::YieldOnce2.
2024-10-11 08:25:02 -07:00
swift-ci
5fa6829c78 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-10 19:47:48 -07:00
Konrad `ktoso` Malawski
6f245bb8eb ABI comments: include stored property names 2024-10-11 08:01:43 +09:00
swift-ci
c49a0e84d3 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-09 10:44:16 -07:00
Meghana Gupta
011b5bf10c Delete dependsOn support
Lifetime dependencies will now be represented with @lifetime attribute in the language.

dependsOn is a type modifier and was represented as a LifetimeDependentTypeRepr in the AST.

I am deleting dependsOn syntax parsing support and retaining LifetimeDependentTypeRepr support.

We may want to represent lifetime dependencies in a function type with a type attribute in the future.
If we use a decl attribute instead, then support for LifetimeDependentTypeRepr can be deleted.
2024-10-07 00:24:35 -07:00
swift-ci
b8a5d2d6d7 Merge remote-tracking branch 'origin/main' into rebranch 2024-10-03 01:35:42 -07:00
Konrad `ktoso` Malawski
dea3b59331 Merge pull request #76250 from ktoso/wip-experimental-isolated-deinit 2024-10-03 17:19:10 +09:00
swift-ci
e5f97d79c5 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-30 07:15:01 -07:00
Konrad `ktoso` Malawski
45b97f146b Merge branch 'main' into wip-experimental-isolated-deinit 2024-09-30 13:47:39 +09:00
Nate Chandler
091368ba21 [CoroutineAccessors] Added read.
The name is a placeholder for the mutating single-yield coroutine
accessor.
2024-09-26 18:10:39 -07:00
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
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
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
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
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
Konrad `ktoso` Malawski
d89347bed0 Merge branch 'main' into wip-experimental-isolated-deinit 2024-09-20 18:34:45 +09:00
swift-ci
ae4fee5d4e Merge remote-tracking branch 'origin/main' into rebranch 2024-09-19 13:54:31 -07:00
Doug Gregor
5b2520e379 Remove IfConfigDecl from the AST
The swift-syntax tree retains information about the parsed #if
regions. Drop it from the semantic AST.
2024-09-18 20:51:54 -07:00
swift-ci
5039a2d86c Merge remote-tracking branch 'origin/main' into rebranch 2024-09-18 10:55:29 -07:00
Michael Gottesman
2eea17ac1d Merge pull request #76491 from gottesmm/rdar135594964
[sending] Look through the sending type repr when printing the type of a function result using the type repr fallback path.
2024-09-18 10:38:55 -07:00
Michael Gottesman
15a34a530f [sending] Look through the sending type repr when printing the type of a function result using the type repr fallback path.
When we print types in the AST printer if for some reason we cannot find the
appropriate type to print or if the user explicitly asks, we fall back and use a
type repr instead.

This behavior causes a problem due to the implementation of sending results
using a sending type repr to communicate that the relevant function has a
sending result, but we actually do not use the sending type repr from that point
on. So as a result, in this fallback case, we put in one too many sending on the
result.

rdar://135594964
2024-09-17 16:54:42 -07:00
Konrad `ktoso` Malawski
7d1ce789ad Revert "Revert "Isolated synchronous deinit"" 2024-09-17 17:35:38 +09:00
Ben Barham
a7b50f357f Merge remote-tracking branch 'origin/main' into manual-main-merge
Conflicts:
  - `lib/Driver/ToolChains.cpp` conflicting with the `addAllArgs` rename
    for multiple options
2024-09-16 13:53:18 -07:00
Meghana Gupta
68bfc0d3b4 Make NonEscapableTypes as a suppressible experimental feature 2024-09-13 13:13:17 -07:00
Meghana Gupta
2b011b0a3a [NFC] Rename/reorg LifetimeDependence utils 2024-09-09 22:02:44 -07:00
swift-ci
290cda09b1 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-09 09:15:25 -07:00
Doug Gregor
c0fea1f224 Disable printing of #ifs from the AST
The option to print #ifs defaulted to "on", but was disabled in most of
the actual compiler inputs that mattered, and the results weren't ever
actually used. Remove the option so we never print #ifs.
2024-09-08 09:52:37 -07:00
Tony Allevato
aebe2ab309 Fix missing operators in synthesized == impls printed by -print-ast.
`visitBinaryExpr` wasn't handling `UnresolvedDeclRefExpr` nodes, which the
synthesized `==` implementation uses to compare fields/payloads. Also fixed
the test that wasn't catching it since it also left out the operators.
2024-09-07 20:13:13 -04:00
swift-ci
99519cb291 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 22:53:33 -07:00
Allan Shortlidge
a770371a80 ModuleInterface: Print patterns with opaque result types using some keyword.
Previously, the opaque types in patterns were printed using their full stable
reference which cannot be resolved when parsing a swiftinterface.

Resolves rdar://127771885.
2024-09-05 16:08:42 -07:00
Allan Shortlidge
2788c1dac1 AST: Introduce PrintWithOpaqueResultTypeKeywordRAII utility. 2024-09-05 16:08:42 -07:00
swift-ci
da55e84c74 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-05 15:35:33 -07:00
Alejandro Alonso
19fc174f30 Don't create fake GTPDs for SIL generic signatures 2024-09-04 15:13:47 -07:00
Alejandro Alonso
e0f2b812e8 Add serialization and parser tests for SIL 2024-09-04 15:13:47 -07:00
Slava Pestov
1ff1b9479a AST: Pick off some usages of GenericTypeParamType::getDecl() 2024-09-04 15:13:46 -07:00
Alejandro Alonso
f4f60f4344 Remove Value requirement Add GenericTypeParamKind 2024-09-04 15:13:43 -07:00
Alejandro Alonso
0df42e9841 Lower UDRE to TypeValue if it references a value generic 2024-09-04 15:13:29 -07:00
Alejandro Alonso
3e9c4633ca Add some new diagnostics and tests 2024-09-04 15:13:27 -07:00
Alejandro Alonso
75c2cbf593 Implement value generics
Some requirement machine work

Rename requirement to Value

Rename more things to Value

Fix integer checking for requirement

some docs and parser changes

Minor fixes
2024-09-04 15:13:25 -07:00
swift-ci
b29ebad446 Merge remote-tracking branch 'origin/main' into rebranch 2024-09-04 12:04:17 -07:00
Slava Pestov
a3c0e225a7 Merge pull request #76238 from slavapestov/existential-signature-rework-part-3
Allow type variables to appear inside opened existential archetypes
2024-09-04 14:53:18 -04:00