Commit Graph

4075 Commits

Author SHA1 Message Date
swift-ci
d5d11b6415 Merge pull request #68045 from slavapestov/chapter-21-completion
Updates to generics.tex
2023-08-21 13:44:54 -07:00
Slava Pestov
a14175b37d Updates to generics.tex 2023-08-21 14:22:55 -04:00
Saleem Abdulrasool
2fab837914 Create WindowsToolchain.md
Add some documentation explaining the installed components and how the toolchain installation is structured.  Add some details about the packaging components.
2023-08-21 07:38:02 -07:00
nate-chandler
8cab09e429 Merge pull request #67966 from nate-chandler/opaque-values/20230816/1/indirect-pack-tuple-handling
[AddressLowering] Handle indexing into variadic tuples.
2023-08-17 14:20:44 -07:00
Nate Chandler
7bddaf36a0 [SIL] Added tuple_pack_extract.
The new instruction is needed for opaque values mode to allow values to
be extracted from tuples containing packs which will appear for example
as function arguments.
2023-08-16 11:15:05 -07:00
Pavel Yaskevich
0ab131c452 [Mangling] NFC: Remove mangling logic and Ha postfix used by @runtimeMetadata records 2023-08-15 12:17:31 -07:00
Nate Chandler
f938287710 [SIL] Added unowned_copy_value. 2023-08-08 15:49:17 -07:00
Nate Chandler
0cb3ce5f3c [SIL] Doc: Tweaked {load,store}_unowned comment. 2023-08-08 15:49:17 -07:00
Nate Chandler
c007bae723 [SIL] Added weak_copy_value.
The new instruction wraps a value in a `@sil_weak` box and produces an
owned value. It is only legal in opaque values mode and is transformed
by `AddressLowering` to `store_weak`.
2023-08-08 15:47:13 -07:00
Nate Chandler
e135c5cac7 [SIL] Added strong_copy_weak_value.
The new instruction unwraps an `@sil_weak` box and produces an owned
value. It is only legal in opaque values mode and is transformed by
`AddressLowering` to `load_weak`.
2023-08-08 15:47:13 -07:00
Nate Chandler
c44b23c954 [SIL] Doc: Tweaked load_weak comment. 2023-08-08 15:47:13 -07:00
nate-chandler
7ea5b1e511 Merge pull request #67693 from nate-chandler/nfc/20230802/1/doc-unowned-insts
[SIL] Doc'd store_unowned and load_unowned.
2023-08-08 15:46:04 -07:00
Nick Randall
46ed883617 Update GettingStarted with note on M1 Macs 2023-08-06 13:26:13 +02:00
Nate Chandler
0d581616e7 [SIL] Doc'd {store,load}_unowned.
Address the todo from 2016.
2023-08-02 16:53:06 -07:00
Joe Groff
e5eede53c3 Merge pull request #67574 from jckarter/raw-layout-doc-clarify
Clarify a statement in the @_rawLayout docs
2023-07-31 16:37:46 -07:00
Nate Chandler
e0d1636901 NFC: Doc'd checked_cast_br formal type.
Update SIL.rst's entry on `checked_cast_br` to include the formal type
that the instruction now takes.
2023-07-28 12:35:11 -07:00
Nate Chandler
e5d87f75a8 [SIL] Add source formal type to checked_cast_br.
It is necessary for opaque values where for casts that will newly start
out as checked_cast_brs and be lowered to checked_cast_addr_brs, since
the latter has the source formal type, IRGen relies on being able to
access it, and there's no way in general to obtain the source formal
type from the source lowered type.
2023-07-27 15:04:15 -07:00
Joe Groff
523d7aa165 Clarify a statement in the @_rawLayout docs
Make it clearer the statement about borrowed `self` and other parameters having
stable addresses for the duration of a method only holds for `@_rawLayout` types.
2023-07-27 10:40:23 -07:00
Joe Groff
705e317c3f Merge pull request #67425 from jckarter/raw-storage
[WIP] Raw storage and locks/atomics prototype
2023-07-26 08:49:02 -07:00
Alex Lorenz
61d73d2b6f Merge pull request #67523 from hyp/eng/compat-version
[cxx-interop] add 'upcoming-swift' C++ interop compat version
2023-07-26 06:09:18 -07:00
Alex Lorenz
5dc5f497a0 [cxx-interop][docs] add a contributor guide 2023-07-25 16:47:42 -07:00
Kavon Farvardin
dade95dcc0 make python 3.6 the official minimum version 2023-07-25 10:33:21 -07:00
Joe Groff
aee071bf4e Introduce an experimental @_rawLayout attribute.
This attribute can be attached to a noncopyable struct to specify that its
storage is raw, meaning the type definition is (with some limitations)
able to do as it pleases with the storage. This provides a basis for
implementing types for things like atomics, locks, and data structures
that use inline storage to store conditionally-initialized values.
The example in `test/Prototypes/UnfairLock.swift` demonstrates the use
of a raw layout type to wrap Darwin's `os_unfair_lock` APIs, allowing
a lock value to be stored inside of classes or other types without
needing a separate allocation, and using the borrow model to enforce
safe access to lock-guarded storage.
2023-07-24 14:28:19 -07:00
Becca Royal-Gordon
2ab1e05c68 [NFC] Add new DiagnosticEngine Decl features
Implements several enhancements to DiagnosticEngine’s handling of Decl arguments:

• All Decl classes, not just ValueDecls, are now valid to use as arguments.
• There is built-in logic to handle accessors by printing a phrase like `getter for 'foo'`, so this no longer has to be special-cased for each diagnostic.
• `%kind` can be used to insert the descriptive kind before a name; `%kindonly` inserts only the descriptive kind. This can eliminate kind/name argument pairs.
• `%base` can insert only the base name, leaving out any argument labels; `%kindbase` combines `%kind` and `%base`.

This PR is marked NFC because there are no intentional uses of these changes yet.
2023-07-19 13:06:51 -07:00
Slava Pestov
f9f0ea2fe5 Work-in-progress second edition of generics.tex
This is not ready for review yet so I'm not updating the PDF on Swift.org.
2023-07-10 23:39:47 -04:00
eeckstein
7fcfcdeecf Merge pull request #66990 from eeckstein/bare-objects
SIL: add a `bare` attribute to `global_value` and `alloc_ref`
2023-06-29 18:48:44 +02:00
Kuba (Brecka) Mracek
d427696bf9 Allow @_silgen_name to be used on globals and add a @_silgen_name(raw: ...) version that skips mangling (#66540)
Attribute @_silgen_name is today only allowed to be used on functions, this change allows usage on globals as well. The motivation for that is to be able to "forward declare" globals just like it's today possible to do with functions (for the cases where it's not practical or convenient to use a bridging header).

Separately, this change also adds a @_silgen_name(raw: ...) syntax, which simply avoids mangling the name (by using the \01 name prefix that LLVM uses). The motivation for that is to be able to reference the "magic Darwin linker symbols" that can be used to look up section bounds (in the current dylib/module) -- those symbols don't use the underscore prefix in their mangled names.
2023-06-29 08:37:51 -07:00
Erik Eckstein
625619ee17 SIL: add a bare attribute to global_value
The `bare` attribute indicates that the object header is not used throughout the lifetime of the value.
This means, no reference counting operations are performed on the object and its metadata is not used.
The header of bare objects doesn't need to be initialized.
2023-06-29 06:57:05 +02:00
Erik Eckstein
b08710d911 SIL: add a bare attribute to alloc_ref
The `bare` attribute indicates that the object header is not used throughout the lifetime of the object.
This means, no reference counting operations are performed on the object and its metadata is not used.
The header of bare objects doesn't need to be initialized.
2023-06-29 06:57:05 +02:00
Max Desiatov
b395c72658 Merge pull request #41690 from apple/maxd/dso-got-plt 2023-06-22 07:56:22 +01:00
Max Desiatov
f61249d34e GettingStarted.md: fix incorrect list item index 2023-06-20 10:05:32 +01:00
Max Desiatov
3a0802b26f GettingStarted.md: add missing link for Ubuntu 18.04 dependencies 2023-06-20 10:04:23 +01:00
Luciano Almeida
4d99f01e9d Merge pull request #66538 from natsuk4ze/do-todo-of-faq 2023-06-14 09:35:16 -03:00
Meghana Gupta
6a2f3c9f84 Merge pull request #66608 from meg-gupta/removeselectvalue
Remove select_value SIL instruction
2023-06-13 21:20:42 -07:00
Midori
01da1cbc57 Add warnings on top 2023-06-14 11:00:55 +09:00
Pavel Yaskevich
19094e3559 Merge pull request #66456 from simanerush/gettingstarted-spacewarning
[docs] GettingStarted: Add a warning about spaces in the absolute path
2023-06-13 14:35:46 -07:00
Meghana Gupta
5d401fb70a Remove select_value SIL instruction 2023-06-13 14:13:43 -07:00
Midori
7b2c3d2252 Add syntax in FAQ.md 2023-06-13 12:03:21 +09:00
Midori
ff50ccacc8 Update FAQ.md
Make the text more recommended.
2023-06-13 11:59:44 +09:00
Midori
a446df35ba Update docs/HowToGuides/FAQ.md
Co-authored-by: Luciano Almeida <passos.luciano@outlook.com>
2023-06-13 00:28:56 +09:00
Midori
b46943f222 Add syntax 2023-06-11 00:11:31 +09:00
Midori
b1e58cfb05 Update FAQ.md 2023-06-10 23:38:36 +09:00
Mishal Shah
330af0b8d1 Remove out of date triggers 2023-06-10 00:00:00 -07:00
Mishal Shah
f3e940d8b1 Merge pull request #66528 from etcwilde/ewilde/update-CI-docs
Updating docs with new CI triggers
2023-06-09 23:56:46 -07:00
Mishal Shah
51c2af639e Update the build toolchain to Please Build Toolchain 2023-06-09 23:56:27 -07:00
Mishal Shah
0bd1c51c85 Update the trigger for Ubuntu 22.04 2023-06-09 23:52:53 -07:00
Evan Wilde
1c0aaef854 Updating docs with new CI triggers 2023-06-09 23:22:39 -07:00
Zoe Carver
4fe20a82a0 Merge pull request #66472 from apple/zoecarver-patch-2
Add link to Swift.org documentation in UserManual.md
2023-06-08 21:28:04 -07:00
Zoe Carver
3c819c3af1 Merge pull request #66467 from apple/zoecarver-patch-1
Add link to Swift.org documentation in UserGuide-CallingSwiftFromC++.md
2023-06-08 17:47:16 -07:00
Zoe Carver
292e2883f6 Merge pull request #66468 from apple/zoecarver-patch-3
Add link to Swift.org documentation in  InteropOddities.md
2023-06-08 17:47:07 -07:00