Commit Graph

4421 Commits

Author SHA1 Message Date
Erik Eckstein
f09dfc93a9 Swift SIL: escape effects for function arguments.
Store a list of argument effects in a function, which specify if and how arguments escape.
Such effects can be specified in the Swift source code (for details see docs/ReferenceGuides/UnderscoredAttributes.md) or derived in an optimization pass.

For details see the documentation in SwiftCompilerSources/Sources/SIL/Effects.swift.
2022-01-25 11:29:44 +01:00
Erik Eckstein
72fc4e3c95 docs: document the existing @_effects() attributes 2022-01-25 11:29:25 +01:00
Xi Ge
1667c5f643 mangling: take the constness of function parameters into mangling
Taking constness of parameters into mangling allows us to support overloads of
functions vary on the constness of specific parameters.

rdar://87954644
2022-01-24 11:51:01 -08:00
Alex Lorenz
e106551028 [NFC][interop] rename the PrintAsObjC library to PrintAsClang
We're starting to support emission of C++ header interfaces, so a language-agnostic name makes more sense
2022-01-20 11:31:58 -08:00
Nate Chandler
572510835b [SIL] Added lexical flag to move_value.
The new flag will be used to track whether a move_value corresponds to a
source-level lexical scope. Here, the flag is just added to the
instruction and represented in textual and serialized SIL.
2022-01-20 08:33:09 -08:00
Philip Turner
bdce80f5ac [docs] Add "currency type" to the lexicon (#40874)
* Unclear word

* Update Lexicon.md

* Update README.md

* Update docs/Lexicon.md

Co-authored-by: Robert Widmann <devteam.codafi@gmail.com>

* Update Lexicon.md

* Update docs/README.md

Co-authored-by: Robert Widmann <devteam.codafi@gmail.com>

* Update docs/README.md

Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>

Co-authored-by: Robert Widmann <devteam.codafi@gmail.com>
Co-authored-by: Xiaodi Wu <13952+xwu@users.noreply.github.com>
2022-01-18 10:37:58 -08:00
Philip Turner
8c283278ef Change gradient(at:in:) to gradient(at:of:) 2022-01-17 12:18:24 -05:00
Philip Turner
d0258c6677 Another small fix 2022-01-16 14:40:44 -05:00
Philip Turner
eed852b8cb Sccache bug has been fixed 2022-01-16 10:55:16 -05:00
Philip Turner
0aabc0c400 Fix typo in GettingStarted.md 2022-01-16 08:51:01 -05:00
Doug Gregor
61d35f07a4 Merge pull request #40766 from DougGregor/mangle-multiple-opaque-types
Introduce a mangling for multiple opaque types within the declaration.
2022-01-07 15:45:38 -08:00
Doug Gregor
f89ff0485f Introduce a mangling for multiple opaque types within the declaration.
The `Qr` mangling is used to refer to the opaque type within the
declaration that produces the opaque type. When there are multiple
opaque types, e.g., due to structural or named opaque result types, it
does not specify which of the opaque type parameters it refers to.

Introduce a new mangling `QR INDEX` for opaque type parameters after
the first, retaining the `Qr` mangling for the first opaque type
parameter. This way, existing (non-structural) uses of opaque result
types retain the same manglings, but uses of structural or named
opaque result types (new features) will have distinct manglings.

Note that this mangling within a declaration is only used for the
declaration itself, and not for references to the opaque type of the
declaration, so there is no impact on the runtime demangler.
2022-01-07 10:43:45 -08:00
Erik Eckstein
383c52aa35 SIL: rename dealloc_ref [stack] -> dealloc_stack_ref
Introduce a new instruction `dealloc_stack_ref ` and remove the `stack` flag from `dealloc_ref`.

The `dealloc_ref [stack]` was confusing, because all it does is to mark the deallocation of the stack space for a stack promoted object.
2022-01-07 16:20:27 +01:00
Robert Widmann
9429514268 Merge pull request #40659 from buttaface/stdlib-remove-icu
[build] Remove last vestiges of ICU for anything other than Foundation
2022-01-07 00:36:13 -08:00
zoecarver
036361d1e4 [cxx-interop] Add SIL function representation cxx_method; Support extending C++ types.
There are three major changes here:
    1. The addition of "SILFunctionTypeRepresentation::CXXMethod".
    2. C++ methods are imported with their members *last*. Then the arguments are switched when emitting the IR for an application of the function.
    3. Clang decls are now marked as foreign witnesses.

These are all steps towards being able to have C++ protocol conformance.
2022-01-06 14:26:47 -08:00
Butta
2890d15da7 [build] Remove last vestiges of ICU for anything other than Foundation 2021-12-25 21:16:34 +05:30
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Pavel Yaskevich
8e1aa19188 [Mangling] Define mangling for runtime accessible function records 2021-12-17 10:52:56 -08:00
Pavel Yaskevich
b8358b26fe [Mangling] Add mangling for distributed method accessors
`Distributed Method Accessor` is a global helper function
to get access to particular `distributed method` on an actor
from outside the process.
2021-12-17 10:52:55 -08:00
Philip Turner
8807f618d2 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Richard Wei <rxrwei@gmail.com>
2021-12-07 18:58:49 -08:00
Philip Turner
bd862efe59 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 17:30:09 -08:00
Philip Turner
a4a74821cf Make two links relative - please review 2021-12-07 20:18:10 -05:00
Philip Turner
5891e06760 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 17:15:18 -08:00
Philip Turner
0d7779e21b Please review - eliminate bulleted list 2021-12-07 20:12:34 -05:00
Philip Turner
59e5db4cfb Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 17:02:15 -08:00
Philip Turner
ef9fb888d4 Update DifferentiableProgrammingImplementation.md 2021-12-07 18:16:48 -05:00
Philip Turner
5a5d727528 Update DifferentiableProgrammingImplementation.md 2021-12-07 18:13:40 -05:00
Philip Turner
b54b9152cf Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 14:47:16 -08:00
Philip Turner
2a91600976 Update DifferentiableProgrammingImplementation.md 2021-12-07 17:42:05 -05:00
Philip Turner
cd2fbecd65 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Richard Wei <rxrwei@gmail.com>
2021-12-07 14:38:50 -08:00
Philip Turner
cb4919b9dc Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Richard Wei <rxrwei@gmail.com>
2021-12-07 14:38:32 -08:00
Philip Turner
d3c5bd8176 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 14:31:54 -08:00
Philip Turner
0f75bfff1d Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 14:29:43 -08:00
Philip Turner
e19cdc27d6 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 13:47:37 -08:00
Philip Turner
ca370faafb Update DifferentiableProgrammingImplementation.md 2021-12-07 16:45:10 -05:00
Philip Turner
66b9bdce94 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Richard Wei <rxrwei@gmail.com>
2021-12-07 13:41:55 -08:00
Philip Turner
7b7cc53071 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:41:21 -08:00
Philip Turner
7525ea4263 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:40:51 -08:00
Philip Turner
fb1ca35e2b Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:40:22 -08:00
Philip Turner
d679737f85 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:39:53 -08:00
Philip Turner
81a262414f Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:39:28 -08:00
Philip Turner
2209a76c53 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:39:00 -08:00
Philip Turner
c8e9fe4166 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:38:32 -08:00
Philip Turner
4b191de7fb Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:37:19 -08:00
Philip Turner
e26835deb2 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:36:43 -08:00
Philip Turner
aaf6efbaad Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:36:12 -08:00
Philip Turner
a886eee7a8 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:35:40 -08:00
Philip Turner
e22e1561fe Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:35:08 -08:00
Philip Turner
90c4c3eb7a Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 05:34:40 -08:00
Philip Turner
e6526d51c2 Update docs/DifferentiableProgrammingImplementation.md
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2021-12-07 04:18:39 -08:00