Commit Graph

4454 Commits

Author SHA1 Message Date
Kuba (Brecka) Mracek
7047809301 Merge pull request #73961 from kubamracek/embedded-docs6
[embedded] Add a summary of the Embedded Swift ABI
2024-06-10 17:07:00 -07:00
Kuba (Brecka) Mracek
bc147aea15 Merge pull request #73944 from kubamracek/embedded-docs5
[embedded] Add a section on Strings into the User Manual
2024-06-10 16:50:38 -07:00
Kuba Mracek
772e066238 [embedded] Add 'sorting strings' to the list of ops that need Unicode data tables 2024-06-10 13:38:32 -07:00
Kuba Mracek
cab0eeed65 [embedded] Expand ABI docs on C/C++ interop 2024-06-10 13:34:03 -07:00
Egor Zhdan
a3e3079fb6 [docs] Suggest --skip-xros in the Getting Started guide
The Getting Started guide offers a build-script command that new contributors can use to quickly build a debug compiler on their local machine. The command already has `--skip-tvos` and `--skip-watchos` flags since most compiler contributors don't need to build for those platforms. This change adds `--skip-xros` flag to the command.
2024-06-10 16:22:36 +01:00
Nate Chandler
2a5d07522d [SIL] Add extend_lifetime instruction.
It indicates that the value's lifetime continues to at least this point.
The boundary formed by all consuming uses together with these
instructions will encompass all uses of the value.
2024-06-05 16:28:26 -07:00
Alejandro Alonso
324cb2df1f Merge pull request #73955 from Azoy/show-me-those-moves
[IRGen] Add option for raw layout to move as its like type
2024-05-30 20:32:49 -07:00
Alejandro Alonso
1d941cddb4 Note that rawLayout movesAsLike should be initialized 2024-05-29 09:37:08 -07:00
Kuba Mracek
a9d149b9be [embedded] Add a summary of the Embedded Swift ABI 2024-05-28 16:21:59 -07:00
Alejandro Alonso
a9da08ccb6 Add option for raw layout to move as its like type 2024-05-28 14:34:22 -07:00
Kuba Mracek
02d7ec27e0 [embedded] Add a section on Strings into the User Manual 2024-05-28 09:32:27 -07:00
Li Xuanji
80e5843611 Update GenericsManifesto.md 2024-05-26 09:17:05 -04:00
Emil Pedersen
0bc6ece9db [DebugInfo] [SILGen] Always use emitDebugDescription (NFCI) 2024-05-23 14:05:13 -07:00
Anthony Latsis
5b9e79e21a Merge pull request #73772 from zaneenders/zane-sparkles-typo 2024-05-22 05:37:16 +03:00
zane
dc3d8d1704 Fix typo in FirstPullRequest.md 2024-05-21 11:19:22 -06:00
Slava Pestov
d489ad364d docs: Update generics.tex 2024-05-21 11:00:28 -04:00
Michael Gottesman
4789cc7e55 Merge pull request #73556 from gottesmm/rdar127295657_127844737
[region-isolation] When inferring isolation for an argument, handle non-self isolated parameters as well as self parameters that are actor isolated.
2024-05-13 11:18:51 -07:00
Emil Pedersen
15cab3a19f Merge pull request #73555 from Snowy1803/complete-getvarinfo
[DebugInfo] Return complete variable info from getVarInfo by default
2024-05-13 10:32:43 -07:00
Michael Gottesman
f51a050af4 [sil] Restrict sil_isolated to only being able to be applied to any actor types.
I also added some docs to SIL.rst about sil_isolated as well.
2024-05-11 17:14:49 -07:00
Emil Pedersen
0be63d0422 [DebugInfo] Return complete variable info from getVarInfo by default
getVarInfo() now always returns a variable with a location and scope.
To opt out of this change, getVarInfo(false) returns an incomplete variable.
This can be used to work around bugs, but should only really be used for
printing.

The complete var info will also contain the type, except for debug_values,
as its type depends on another instruction, which may be inconsistent if
called mid-pass.

All locations in debug variables are now also stripped of flags, to avoid
issues when comparing or hashing debug variables.
2024-05-10 16:12:56 -07:00
Emil Pedersen
bf58b030c5 Merge pull request #73387 from Snowy1803/allocbox-fix
[DebugInfo] Fix loss of variables at -Onone
2024-05-02 12:39:17 -07:00
Emil Pedersen
d451c3e4e1 Merge pull request #73334 from Snowy1803/unified-lost-vars-statistics
Add compile flag for lost debug variables statistics
2024-05-01 18:03:32 -07:00
Hamish Knight
c2266a17a5 [docs] Update ASan trigger in ContinuousIntegration.md 2024-05-01 22:06:29 +01:00
Emil Pedersen
f6232a937d [DebugInfo] Fix wrong scope being used in AllocBoxToStack 2024-04-30 16:29:49 -07:00
Emil Pedersen
7e81fd60f1 [docs] Document the lost variables statistics option 2024-04-30 13:18:38 -07:00
Emil Pedersen
84dae7c37a [DebugInfo] Add support for constant debug values 2024-04-26 16:31:16 -07:00
Emil Pedersen
8ad3066011 [DebugInfo] Fix implicit deref on arithmetic expressions 2024-04-26 16:31:16 -07:00
Emil Pedersen
c2c16f53dd [DebugInfo] Fix undef debug values being removed 2024-04-26 16:31:16 -07:00
Emil Pedersen
9c9f14f6d3 [docs] Add more details to HowToUpdateDebugInfo 2024-04-26 16:31:11 -07:00
Adrian Prantl
76bbea6070 Merge pull request #73122 from adrian-prantl/sil-howto-debuginfo
Add the beginning of a Debug Info guide for SIL pass authors.
2024-04-19 17:39:22 +02:00
Adrian Prantl
22afb55fb5 Add the beginning of a Debug Info guide for SIL pass authors.
This document describes how debug info works at the SIL level and how to
correctly update debug info in SIL optimization passes. This document is
inspired by its LLVM analog, "How to Update Debug Info: A Guide for LLVM Pass
Authors", which can be found at https://llvm.org/docs/HowToUpdateDebugInfo.html
2024-04-18 16:18:20 -07:00
Erik Eckstein
ac4bc89c9a SIL: add the borrowed-from instruction.
It declares from which enclosing values a guaranteed phi argument is borrowed from.
2024-04-10 13:38:10 +02:00
Emil Pedersen
512ac6cc31 Merge pull request #72860 from Snowy1803/salvage-debug-info-tuple
[DebugInfo] Salvage debug info for tuples
2024-04-05 20:16:24 -07:00
Michael Gottesman
0922665c05 [Debugging The Compiler.md] Add documentation that says how to lookup Windows Error Codes
Specifically, I put information about the system error code lookup tool and links to Microsoft's documentation.
2024-04-05 13:39:14 -07:00
Slava Pestov
480592a7d5 Merge pull request #72847 from slavapestov/fix-rdar123645784
Fix two problems with opaque return types -vs- parameter packs
2024-04-05 07:31:34 -04:00
Anthony Latsis
f7ce9a79d6 Merge pull request #72729 from AnthonyLatsis/contributor-experience-help 2024-04-05 11:36:36 +03:00
Emil Pedersen
efa09088ac Revert "[DebugInfo][SIL] Introduce the 'implicit' attribute for debug variable"
This reverts commit e63632fda8.

rdar://125939953
2024-04-04 17:23:32 -07:00
Slava Pestov
270be443b2 ASTMangler: Support for pack conformances
The names of the private witness table accessor thunks we generate for
an opaque return type mangle the concrete conformance of the underlying
type.

If a conformance requirement of the opaque return type was witnessed by
a conditional conformance of a variadic generic type, we would crash
because of an unimplemented case in the mangler.

Fixes rdar://problem/125668798.
2024-04-04 19:35:36 -04:00
Meghana Gupta
0cddd69415 Merge pull request #72780 from meg-gupta/enablesilcombineossa
Enable inject_enum_addr silcombine in ossa
2024-04-03 15:59:22 -07:00
Meghana Gupta
c30eea156f Verify switch_value has int operands only 2024-04-03 10:30:55 -07:00
Anthony Latsis
f1732b1eb4 [docs] FirstPullRequest: Ask people to reach out to CEW members for help on GitHub
This is easier than messaging the workgroup on the forums
2024-03-30 20:52:28 +03:00
Doug Gregor
be7b5b6d6a Merge pull request #72692 from DougGregor/future-proof-invertible-mangling
Future-proof the mangling of invertible protocols
2024-03-29 08:10:01 -07:00
Becca Royal-Gordon
576a4bac36 Merge pull request #72596 from beccadax/objcimpl-real-name
Add @implementation and feature flags for objcImpl
2024-03-28 23:48:24 -07:00
Meghana Gupta
4a0f3809af Merge pull request #72684 from meg-gupta/fixlifetimedemangling
Fix lifetime dependence demangling and add a new Sema diagnostic
2024-03-28 22:43:49 -07:00
Doug Gregor
757ebe2979 Future-proof the mangling of invertible protocols
Invertible protocols are currently always mangled with `Ri`, followed by
a single letter for each invertible protocol (e.g., `c` and `e` for
`Copyable` and `Escapable`, respectively), followed by the generic
parameter index. However, this requires that we extend the mangling
for any future invertible protocols, which mean they won't be
backward compatible.

Replace this mangling with one that mangles the bit # for the
invertible protocol, e.g., `Ri_` (followed by the generic parameter
index) is bit 0, which is `Copyable`. `Ri0_` (then generic parameter
index) is bit 1, which is `Escapable`. This allows us to round-trip
through mangled names for any invertible protocol, without any
knowledge of what the invertible protocol is, providing forward
compatibility. The same forward compatibility is present in all
metadata and the runtime, allowing us to add more invertible
protocols in the future without updating any of them, and also
allowing backward compatibility.

Only the demangling to human-readable strings maps the bit numbers
back to their names, and there's a fallback printing with just the bit
number when appropriate.

Also generalize the mangling a bit to allow for mangling of invertible
requirements on associated types, e.g., `S.Sequence: ~Copyable`. This
is currently unsupported by the compiler or runtime, but that may
change, and it was easy enough to finish off the mangling work for it.
2024-03-28 21:26:13 -07:00
Kuba (Brecka) Mracek
095173aed6 Merge pull request #72687 from kubamracek/embedded-update-status4
[embedded] Update KeyPath status in EmbeddedSwiftStatus.md
2024-03-28 20:25:51 -07:00
Kuba Mracek
43f8ffaff3 [embedded] Update KeyPath status in EmbeddedSwiftStatus.md 2024-03-28 16:23:37 -07:00
Meghana Gupta
bc0b884609 Fix demangling of lifetime dependence when other function annotations like throws etc are present
It was demangled in the wrong order previously.
2024-03-28 14:58:06 -07:00
Cyandev
f8ea920c05 Fix broken table in CallConvSummary.rst 2024-03-28 16:42:00 +08:00
Becca Royal-Gordon
2a53433ad7 Soften @impl warnings only for early adopters
Adopting @implementation turns all of the warnings into errors.
2024-03-27 14:29:57 -07:00