Commit Graph

4421 Commits

Author SHA1 Message Date
Konrad `ktoso` Malawski
fe539399d1 Update GettingStarted.md 2022-04-05 13:18:53 +09:00
Konrad `ktoso` Malawski
8775359704 Apply suggestions from code review
Co-authored-by: buttaface <repo@butta.fastem.com>
2022-04-05 11:47:20 +09:00
Konrad `ktoso` Malawski
92acc18a7d Minor update to clion guide 2022-04-05 10:22:56 +09:00
Konrad `ktoso` Malawski
c5bd201e41 [Guide] Add guide to set up CLion for compiler development 2022-04-05 10:21:23 +09:00
Ikko Ashimine
92f8f1dbba RequirementMachine: Fix typo
arbitary -> arbitrary
2022-04-04 19:59:55 +09:00
zoecarver
637bb90cdc [docs] Add a catch all document to record C++ interop oddities. 2022-04-01 16:32:51 -07:00
eeckstein
069653db32 Merge pull request #42030 from eeckstein/remove-unused-instructions
SIL: remove unused instructions thin_function_to_pointer and pointer_ to_thin_function
2022-03-27 08:55:26 +02:00
Aayush
8dd91820fb Adding Syntax Highlighting
using `.. code-block:: swift` instead of `::` we can turn code into more prettier and legible form!
2022-03-25 12:31:11 -04:00
Erik Eckstein
6b7ae416e6 SIL: remove unused instructions thin_function_to_pointer and pointer_to_thin_function 2022-03-25 15:44:59 +01:00
swift-ci
db4a7e639f Merge pull request #41941 from apple/verify-fixit-alternation-docs
Add diagnostic verifier features to Diagnostics.md
2022-03-23 12:35:39 -07:00
Andrew Trick
406aa86d2e Merge pull request #41557 from atrick/addrlower-update
Update and reimplement AddressLowering pass (for SIL opaque values).
2022-03-21 22:15:06 -07:00
Becca Royal-Gordon
132620a595 Correct description of fix-it line numbers 2022-03-21 15:34:41 -07:00
Becca Royal-Gordon
1717935c7b Add diagnostic verifier features to Diagnostics.md
We've made changes to the diagnostic verifier over time that we failed to actually document. Update docs/Diagnostics.md to describe:

* Fix-it alternation (cdcd726f92)
* Fix-it line offsets (2128678d56)
* Additional files (5036a55550)
* Ignoring `<unknown>` diagnostics (384ab780e9)

I've also slightly fleshed out the description of fix-it expectations.
2022-03-21 15:13:29 -07:00
Egor Zhdan
5c2028d8bf Merge pull request #41918 from apple/egorzhdan-patch-1
[Docs] Fix dead link to the C++ Interop manifesto
2022-03-21 18:40:30 +00:00
Egor Zhdan
1124248416 [Docs] Fix dead link to the C++ Interop manifesto 2022-03-21 14:47:34 +00:00
Allan Shortlidge
2a646dc438 Parse: Require a "before: " label in the first item of the list in the @_backDeploy attribute in order to match the pitched syntax for the attribute. Refactor existing comma separated list parsing code to take advantage of part of it in the attribute parsing. 2022-03-18 11:31:34 -07:00
zoecarver
7d2aac6c00 [nfc][docs][cxx-interop] Add example in the status document. 2022-03-17 20:47:49 -07:00
Alex Lorenz
a023cf986b [cxx-interop] docs, fixup to c++ interop status page after review comments 2022-03-15 11:52:17 -07:00
Alex Lorenz
3a41bcdeaa [cxx-interop][docs] add a C++ interoperability status document 2022-03-14 21:01:17 -07:00
Konrad `ktoso` Malawski
5ab8e0834d [Distributed] Reimplement distributed call thunks completely in AST (#41616)
* [Distributed] dist actor always has default executor (currently)

* [Distributed] extra test for missing makeEncoder

* [DistributedDecl] Add DistributedActorSystem to known SDK types

* [DistributedActor] ok progress on getting the system via witness

* [Distributed] allow hop-to `let any: any X` where X is DistActor

* [Distributed] AST: Add an accessor to determine whether type is distributed actor

- Classes have specialized method on their declarations
- Archetypes and existentials check their conformances for
  presence of `DistributedActor` protocol.

* [Distributed] AST: Account for distributed members declared in class extensions

`getConcreteReplacementForProtocolActorSystemType` should use `getSelfClassDecl`
otherwise it wouldn't be able to find actor if the member is declared in an extension.

* [Distributed] fix ad-hoc requirement checks for 'mutating'

[PreChecker] LookupDC might be null, so account for that

* [Distributed] Completed AST synthesis for dist thunk

* [Distributed][ASTDumper] print pretty distributed in right color in AST dumps

* wip on making the local/remote calls

* using the _local to mark the localCall as known local

* [Distributed] fix passing Never when not throwing

* fix lifetime of mangled string

* [Distributed] Implement recordGenericSubstitution

* [Distributed] Dont add .

* [Distributed] dont emit thunk when func broken

* [Distributed] fix tests; cleanups

* [Distributed] cleanup, move is... funcs to DistributedDecl

* [Distributed] Remove SILGen for distributed thunks, it is in Sema now!

* [Distributed]  no need to check stored props in protocols

* remote not used flag

* fix mangling test

* [Distributed] Synthesis: Don't re-use AST nodes for `decodeArgument` references

* [Distributed] Synthesis: Make sure that each thunk parameter has an internal name

* [Distributed/Synthesis] NFC: Add a comment regarding empty internal parameter names

* [Distributed] NFC: Adjust distributed thunk manglings in the accessor section test-cases

* cleanup

* [Distributed] NFC: Adjust distributed thunk manglings in the accessor thunk test-cases

* review follow ups

* xfail some linux tests for now so we can land the AST thunk

* Update distributed_actor_remote_functions.swift

Co-authored-by: Pavel Yaskevich <xedin@apache.org>
2022-03-10 23:58:23 +09:00
Alex Lorenz
e05b011eb0 [docs] NFC, fix typo CppInteropability -> CppInteroperability 2022-03-09 18:10:58 -08:00
Andrew Trick
f4176b9111 [SIL-opaque] Code review suggestions
Mostly documentation and typos.
2022-03-09 17:18:15 -08:00
Robert Widmann
3b3ff6a5db Define Mangling for ParameterizedProtocol 2022-03-08 22:01:19 -08:00
Zoe Carver
e6d8912a58 Merge pull request #41712 from cabmeurer/cxx-interop/Fix-typo-update-example-cxx-module
[cxx-interop] Fix typo in getting started, and update example for creating the cxx module
2022-03-08 16:06:37 -08:00
Caleb Meurer
9ad87981ba Fix typo in getting started, and update example for creating the cxx module 2022-03-07 15:10:33 -07:00
Xi Ge
43a8482fd4 doc: add documentation for @_spi_available 2022-03-06 08:39:03 -08:00
Max Desiatov
d4a65b7d49 Docs: add DSO, GOT, and PLT to Lexicon.md
These terms are frequently referenced in Swift source code and comments. Having at least basic definitions for them in `Lexicon.md` should lower the barrier for new contributors.
2022-03-05 16:58:58 +00:00
cabmeurer
23ba70e7ba [cxx-interop] Update GettingStartedWithC++Interop documentation (#41597) 2022-03-01 15:14:14 -08:00
cabmeurer
417adb5ac5 C++ Interop Getting Started Documentation (#41580) 2022-02-28 17:17:51 -08:00
Allan Shortlidge
9e4ba442a2 Merge pull request #41416 from tshortli/back-deploy-thunk
Emit and call thunks for back deployed functions
2022-02-25 17:49:08 -08:00
Robert Widmann
496da9dda9 Merge pull request #40977 from buttaface/droid-test 2022-02-21 22:46:42 -08:00
Allan Shortlidge
ed6d69fb15 Mangling: Add a mangling for back deployment fallback functions and update the back deployment thunk mangling to use the same prefix. 2022-02-18 16:30:27 -08:00
Allan Shortlidge
ff5abc4e2f Mangling: Use 'Tw' to mangle back deployment thunks. 2022-02-17 11:28:12 -08:00
Michael Gottesman
28fb3db8b9 Merge pull request #41378 from gottesmm/pr-4f030e9c7eb178276a709f3b668f8f9f357ffb40
[move-function] Add initial debug info support to move checker passes.
2022-02-14 22:41:00 -08:00
Michael Gottesman
375ce353f2 [move-function] Add a flag to alloc_stack and debug_value that states that they describe an address/value that was moved at some point locally in the function.
The main effect of this will be that in IRGen we will use llvm.dbg.addr instead
of llvm.dbg.declare. We must do this since llvm.dbg.declare implies that the
given address is valid throughout the program.

This just adds the instructions/printing/parsing/serialization/deserialization.

rdar://85020571
2022-02-14 17:56:03 -08:00
John McCall
b3b6701a50 Implement @_unsafeInheritExecutor.
SE-0338 changed the execution of non-actor async functions
so that they always hop to the generic executor, but some
functions need a way to suppress this so that they inherit
the caller's executor.

The right way to implement this is to have the caller pass
down the target executor in some reliable way and then
switch to it in all the appropriate places in the caller.
We might reasonably be able to build this on top of isolated
parameters, using some sort of default argument, or we might
need a wholly novel mechanism.

But those things are all ABI-breaking absent some sort of
guarantee about switching that we probably don't want to make,
and unfortunately we have functions in the library which we
need to export that need to inherit executors.  So in the
short term, we need some unsafe way of getting back to the
previous behavior.
2022-02-14 20:46:03 -05:00
Butta
26aafe66f6 [android] Fix some tests and a doc flag
Use off_t for a recently failing stdlib test, remove Python hacks for some
tests that now work without them, and correct build flag in the docs.
2022-02-14 03:02:04 +05:30
nate-chandler
63161e6ee5 Merge pull request #41228 from nate-chandler/lexical_lifetimes/owned_function_args_are_lexical
[SIL] Make owned function arguments lexical.
2022-02-11 18:11:59 -08:00
Nate Chandler
2da6ac19a0 [SIL] Doc'd deinit barriers. 2022-02-10 16:28:42 -08:00
swift-ci
e679d6f0be Merge pull request #41236 from apple/maxd/tbd-lexicon 2022-02-09 18:41:24 -08:00
Max Desiatov
3658a9d138 docs: add TBD to Lexicon.md
Description was copy-pasted from https://lists.llvm.org/pipermail/llvm-dev/2017-September/117264.html
2022-02-09 20:55:04 +00:00
Erik Eckstein
8fe36eedd8 SILPassManager: improve bisecting for debugging the optimizer
* Add the possibility to bisect the individual transforms of SILCombine and SimplifyCFG.
   To do so, the `-sil-opt-pass-count` option now accepts the format `<n>.<m>`, where `m` is the sub-pass number.
   The sub-pass number limits the number of individual transforms in SILCombine or SimplifyCFG.

* Add an option `-sil-print-last` to print the SIL of the currently optimized function before and after the last pass, which is specified with `-sil-opt-pass-count`.
2022-02-09 13:25:30 +01:00
Allan Shortlidge
b860e762b2 AST: Introduce the @_backDeploy function attribute:
- Parse the attribute and diagnose parsing issues
- Serialize the attribute
2022-02-08 10:11:04 -08:00
Philip Turner
19b4492432 Add DifferentiableProgrammingImplementation.md to docs/README.md (#41123)
* Update README.md

* Update docs/README.md

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

Co-authored-by: Robert Widmann <devteam.codafi@gmail.com>
2022-02-07 12:03:38 -08:00
Malik Idrees Hasan Khan
65ba422d16 Fix typos in SIL.rst 2022-02-04 20:31:25 +05:30
Erik Eckstein
13d2b1fe15 mangling: add a mangling for constant propagating keypaths in capture propagation.
This is not ABI affecting.
2022-02-01 08:13:27 +01:00
Max Desiatov
ed5974dd69 docs: add "Bringing Swift to Windows" talk to the list (#41025)
Adding this relatively recent talk to `ExternalResources.md`.
2022-01-28 17:48:27 +00:00
nate-chandler
0472c0d83c Merge pull request #40926 from nate-chandler/sil/move_value_defined_flag
[SIL] Added lexical flag to move_value.
2022-01-26 19:58:27 -08:00
Pavel Yaskevich
4aa201396f Merge pull request #41001 from xedin/switch-to-build-wrangler
[Lexicon] Change `build czar` to `build wrangler`
2022-01-25 16:08:59 -08:00
Pavel Yaskevich
dd5dc84bf7 [Lexicon] Change build czar to build wrangler 2022-01-25 10:27:57 -08:00