Commit Graph

4473 Commits

Author SHA1 Message Date
John McCall
46623cb6c7 Merge pull request #84811 from rjmccall/verify-dead-end-edges
Strengthen the SIL verifier's rules for edges into dead-end regions
2025-10-11 18:16:56 -04:00
John McCall
f3c9ab8d50 Document SIL's dominance rules, which apparently we've never done. 2025-10-11 02:12:19 -04:00
Max Desiatov
db21bc20ea Merge pull request #84399 from MaxDesiatov/docs-wasm-swift-sdk
docs/WebAssembly.md: update Swift SDK build instructions

Swift SDKs require Swift SDK Generator to be built with its dependencies. Additionally, now that tests for Wasm stdlib run by default, we should include required tools. Embedded Swift build is also enabled in the documented invocation.
2025-10-10 23:20:38 +01:00
Mishal Shah
9d9116ed86 Merge pull request #84650 from rjmansfield/update-CI-md
Remove CentOS 7 and Ubuntu 18.04 from ContinuousIntegration.md.
2025-10-07 14:06:45 -07:00
eeckstein
401a2ac2bc Merge pull request #84704 from eeckstein/closure-specialization
ClosureSpecialization: support for OSSA and a big overhaul
2025-10-07 06:59:08 +02:00
Mishal Shah
ee04cb84b2 Merge pull request #84696 from valeriyvan/Generics-typos 2025-10-06 07:57:15 -07:00
Erik Eckstein
89bba668e2 Mangling: add a closure specialization mangling for arguments which specialize for the same closure as a previous argument
For example:
```
  %1 = partial_apply %closure
  apply %f(%1, %1)    // first argument: `.closure(%1)`
                      // second argument: `.previousArgumentIndex(0)`
```
2025-10-06 09:47:41 +02:00
Slava Pestov
ee156f2f12 Merge pull request #84689 from jamieQ/patch-2
[docs]: minor edits to 'existential types' chapter of generics book
2025-10-05 13:45:31 -04:00
Valeriy Van
5e098ff3af Fix typos in docs/Generics 2025-10-05 12:24:02 +02:00
Jake Petroules
4e8761a2cb Remove trailing spaces in Windows build docs (#84693)
This changes the meaning of the command, causing the remaining arguments
to be truncated.
2025-10-05 02:51:04 -07:00
Jamie
feead0cb22 [docs]: minor edits to 'existential types' chapter of generics book
fixed a couple typos encountered
2025-10-04 05:43:42 -05:00
Ryan Mansfield
5ea2bc9c71 Remove CentOS 7 and Ubuntu 18.04 from ContinuousIntegration.md.
Add Ubuntu 24.04.
2025-10-02 11:45:21 -04:00
Max Desiatov
2987ec80ec docs/WebAssembly.md: provide Swift SDK installation step 2025-09-19 17:30:16 +01:00
Max Desiatov
c2ca497571 docs/WebAssembly.md: update Swift SDK build instructions
Swift SDKs require Swift SDK Generator to be built with its dependencies. Additionally, now that tests for Wasm stdlib run by default, we should include required tools. Embedded Swift build is also enabled in the documented invocation.
2025-09-19 16:36:48 +01:00
Kavon Farvardin
2dea3ca3fc sil: load [copy] affects reference counting
Based on what I see from OwnershipModelEliminator,
`%x = load [copy] %y` can turn into a plain load
followed by a retain of the loaded value.

See `NonTrivialLoadableTypeLowering::emitLoad`
2025-09-16 15:25:20 -07:00
Meghana Gupta
c764244df0 Merge pull request #84180 from meg-gupta/borrowandmutatepr
Add preliminary support for borrow accessors
2025-09-15 10:01:15 -07:00
Meghana Gupta
aeac529925 [NFC] Add notes on self argument of borrow accessor being non-lexical 2025-09-14 23:38:18 -07:00
Hamish Knight
8e84e6a50d [docs] Update RequestEvaluator.md
The request evaluator is no longer new, and we've since implemented
per-request caching.
2025-09-12 20:39:58 +01:00
Meghana Gupta
28c4595735 Add mangling support for borrow/mutate accessors 2025-09-09 14:30:34 -07:00
Andrew Trick
592642087f Merge pull request #84010 from atrick/lifedep-mutating-default
@_lifetime defaults
2025-09-04 15:44:46 -07:00
Erik Eckstein
1a4bd76f95 Mangling: add specialization mangling for more complex constant propagated function arguments
So far, constant propagated arguments could only be builtin literals.
Now we support arbitrary structs (with constant arguments), e.g. `Int`.
This requires a small addition in the mangling scheme for function specializations.
Also, the de-mangling tree now looks a bit different to support a "tree" of structs and literals.
2025-09-04 08:15:44 +02:00
Andrew Trick
84a4b328ec Lifetime inference test case improvements.
Cleanup the tests so we can cross reference them with the documentation.

Update the tests to allow multiple annotations and defaults.
2025-09-03 22:42:13 -07:00
Andrew Trick
bbdadac8fe Document @_lifetime annotation 2025-09-03 22:42:13 -07:00
Janat Baig
798c0f51a4 Merge branch 'main' into temp-branch 2025-08-23 11:11:04 -04:00
JanBaig
d3c40c0579 [Docs] Document mangling for the init accessor thunk 2025-08-23 11:03:57 -04:00
JanBaig
95cf42b516 [Docs] Add assign_or_init documentation and remove assign_by_wrapper 2025-08-23 10:38:53 -04:00
Nate Chandler
aa85694237 [NFC] OSSACompleteLifetime: Renamed. 2025-08-18 09:45:19 -07:00
finagolfin
1dbdf0c26f [android][docs] Update to latest info (#83611) 2025-08-09 01:44:53 +05:30
Nate Cook
c88d8cf885 Include Apple Silicon benchmarking command (#83216) 2025-07-22 15:46:19 -07:00
Max Desiatov
ede49497d5 GettingStarted.md: avoid preinstalling CMake (#83063)
We're seeing multiple build failures with CMake 4.0: e.g. SwiftPM bootstrapping issues  on macOS. `build-script` will always build a fixed version of CMake that's known to work if preinstalled one is not found. Let's reduce the chances for confusion by not recommending preinstalled CMake in `GettingStarted.md`.
2025-07-17 17:04:19 +01:00
Anthony Latsis
01c26004fc Merge pull request #66349 from LiamSwayne/patch-1 2025-07-06 16:25:03 +01:00
Slava Pestov
9033198674 ASTDemangler: Round-trip @isolated @sil_implicit_leading_param parameter attributes
We sometimes mangle SILFunctionTypes when generating debug info
for reabstraction thunks, and these can have various exotic
parameter and result attributes. Two recent additions were
never plumbed through the mangler, causing assertion failures
when emitting debug info.

Fixes rdar://153730847.
2025-06-27 10:56:12 -04:00
Doug Gregor
96297e61ee Make the mangling grammar a little more regular
A few cleanups:
- Fix some comments
- Remove redundant rules
- Make sure every term is defined
- Don't use '|'; write it out as a term
2025-06-23 07:05:39 -07:00
Rauhul Varma
acbdfef4f4 Remove stale embedded swift documentation (#82395)
Update in-tree markdown files with links to the new Embedded Swift
documentation home.
2025-06-21 19:24:55 -07:00
Andrew Trick
5b5f370ce1 LifetimeDependenceScopeFixup: crash handling dead-end coroutine
When extending a coroutine, handle the end_borrow instruction used to end a
coroutine lifetime at a dead-end block.

Fixes rdar://153479358 (Compiler crash when force-unwrapping optional ~Copyable type)
2025-06-16 21:43:44 -07:00
Pavel Yaskevich
8e49860349 [Demangle] Implement missing Node::Kind::OutlinedInitializeWithTakeNoValueWitness
Implements de/remangler support for `WOB` manglings.
2025-06-05 14:07:05 -07:00
Michael Gottesman
56aa981099 [sil][docs] Add documentation about sil_implicit_leading_param. 2025-05-23 10:25:54 -07:00
Anthony Latsis
6eacd233cf Merge pull request #81392 from jamieQ/patch-2
[docs][gardening]: fix typo in KeyPaths.md
2025-05-18 14:48:13 +01:00
Pavel Yaskevich
04d46760bb [AST] Extend @_inheritActorContext attribute to support optional always modifier
By default (currently) the closure passed to a parameter with `@_inheritActorContext`
would only inherit isolation from `nonisolated`, global actor isolated or actor
context when "self" is captured by the closure. `always` changes this behavior to
always inherit actor isolation from context regardless of whether it's captured
or not.
2025-05-14 20:07:57 -07:00
Erik Eckstein
a38db6439a SIL: add the vector_base_addr instruction
It derives the address of the first element of a vector, i.e. a `Builtin.FixedArray`, from the address of the vector itself.
Addresses of other vector elements can then be derived with `index_addr`.
2025-05-12 19:24:31 +02:00
Jamie
996510e9e8 [docs][gardening]: fix typo in KeyPaths.md
remove a superfluous word
2025-05-08 20:28:50 -05:00
Meghana Gupta
3cad5c5924 Merge pull request #81043 from meg-gupta/fixcow
Insert end_cow_mutation_addr for lifetime dependent values dependent on mutable addresses
2025-05-01 07:26:28 -07:00
Meghana Gupta
35d62a4a36 Introduce end_cow_mutation_addr instruction 2025-04-30 13:39:45 -07:00
Kuba (Brecka) Mracek
7768aa3c31 Merge pull request #81175 from kubamracek/embedded-docs10
[embedded] Add documentation for class-bound existentials in Embedded Swift
2025-04-30 13:38:59 -07:00
Kuba Mracek
b1624479ca [embedded] Add documentation for class-bound existentials in Embedded Swift 2025-04-29 11:51:56 -07:00
Kuba (Brecka) Mracek
61e818bcf6 [embedded] Update EmbeddedSwiftStatus.md about int parsing and lazy collections 2025-04-28 13:02:50 -07:00
Anthony Latsis
ada632c488 [docs] Diagnostics: Add quoting guidelines 2025-04-22 18:23:40 +01:00
Slava Pestov
a74a445dc4 Merge pull request #80964 from slavapestov/library-evolution-doc-fix
docs: Remove obsolete restriction from LibraryEvolution.rst
2025-04-21 21:57:49 -04:00
Kuba (Brecka) Mracek
73e5fbdae7 Merge pull request #80649 from kubamracek/embedded-docs-4
[embedded] Add documentation for non-final generic methods
2025-04-21 18:23:01 -07:00
Slava Pestov
4b6d19c98d docs: Remove obsolete restriction from LibraryEvolution.rst 2025-04-21 16:29:58 -04:00