Commit Graph

3911 Commits

Author SHA1 Message Date
Nate Chandler
2060979b97 [Doc] Added a little on store_borrow. 2022-12-09 11:18:06 -08:00
Max Desiatov
226c7c8eb9 docs: convert FailableInitializers.rst to Markdown (#62417)
Resolves partially https://github.com/apple/swift/issues/49997.
2022-12-08 07:47:43 +00:00
Anthony Latsis
86d3220d07 Merge pull request #62371 from AnthonyLatsis/wakamole
GettingStarted.md: A sprinkle of minor improvements
2022-12-08 09:44:28 +03:00
Anthony Latsis
52c821a76c GettingStarted.md: Reformat notes 2022-12-08 06:48:31 +03:00
Anthony Latsis
c7ca36186a GettingStarted.md: Fix indentation in bullet so that it renders correctly 2022-12-08 06:48:31 +03:00
Anthony Latsis
3cfb3b8346 GettingStarted.md: Don’t suggest starting Sccache manually: build-script does it for you 2022-12-08 06:48:16 +03:00
Alex Lorenz
91f7ea1ced Merge pull request #62413 from hyp/eng/uncaught-exc-ub-docs
[interop][docs] Clarify in the interop status that uncaught exception…
2022-12-06 07:28:29 -08:00
Keith Smiley
82048bd0c4 [docs] Disable warnings as errors (#62408)
Currently the rst files have a bunch of warnings that cause build
failures if you have sphinx installed. It sounds like these files are
all on the path to being converted to markdown, so this loosens that
restriction to not block folks from building.
2022-12-05 21:45:58 -08:00
Alex Lorenz
ef8c34e622 Merge pull request #62412 from hyp/eng/import_ref_docx2
[docs][interop] give a more specific example of how to use import_ref…
2022-12-05 19:46:50 -08:00
Allan Shortlidge
9936a60333 Merge pull request #62410 from tshortli/man-swift-repl 2022-12-05 17:00:38 -08:00
Alex Lorenz
548f59aa03 [interop][docs] Clarify in the interop status that uncaught exceptions are UB 2022-12-05 15:29:40 -08:00
Alex Lorenz
d6e83587b8 [docs][interop] give a more specific example of how to use import_reference to import an FRT into Swift 2022-12-05 15:18:50 -08:00
Allan Shortlidge
12ee2c6824 Docs: Update swift manpage to instruct users to run swift repl for the REPL.
Resolves rdar://102727000
2022-12-05 13:41:47 -08:00
Max Desiatov
1e7961f043 docs: remove files converted to Markdown from contents.rst
This fixes

```
Warning, treated as error:
swift/docs/contents.rst:6:toctree contains reference to nonexisting document 'ErrorHandlingRationale'
```
2022-12-05 21:20:59 +00:00
swift-ci
511d78b1aa Merge pull request #62318 from apple/maxd/docs-error-handling-rationale
docs: convert `ErrorHandlingRationale` from `.rst` to `.md`
2022-12-05 08:17:08 -08:00
Max Desiatov
d422594696 docs/ErrorHandlingRationale.md: add table of contents 2022-12-05 13:43:44 +00:00
AgranatMarkit
f3a461b42a move Generics.rst to archive folder 2022-11-30 23:18:45 +02:00
swift-ci
51c5da0f70 Merge pull request #62297 from apple/maxd/docs-error-handling
docs: convert `ErrorHandling` from `.rst` to `.md`
2022-11-30 10:24:50 -08:00
Max Desiatov
e0a12d1f93 Merge pull request #62055 from apple/maxd/git-started
HowToGuides/GettingStarted: require Git 2.x

Trying to run update-checkout with Git 1.8.3.1 fails during rebasing. Git 2.38 works fine. Additionally, looks like Git 1.x requires committer name and email to be set during rebasing, which also causes errors. We should recommend Git 2.x explicitly to make sure new contributors don't get confused by this.
2022-11-30 16:16:47 +00:00
Max Desiatov
3ea7469415 docs: convert ErrorHandlingRationale from .rst to .md
Resolves partially #49997.
2022-11-30 16:13:24 +00:00
Max Desiatov
4296351ee7 docs/README.md: fix outdated links 2022-11-30 15:47:39 +00:00
Dario Rexin
3cf40ea504 [IRGen] Re-introduce TypeLayout strings (#62059)
* Introduce TypeLayout Strings

Layout strings encode the structure of a type into a byte string that can be
interpreted by a runtime function to achieve a destroy or copy. Rather than
generating ir for a destroy/assignWithCopy/etc, we instead generate a layout
string which encodes enough information for a called runtime function to
perform the operation for us. Value witness functions tend to be quite large,
so this allows us to replace them with a single call instead. This gives us the
option of making a codesize/runtime cost trade off.

* Added Attribute @_GenerateLayoutBytecode

This marks a type definition that should use generic bytecode based
value witnesses rather than generating the standard suite of
value witness functions. This should reduce the codesize of the binary
for a runtime interpretation of the bytecode cost.

* Statically link in implementation

Summary:
This creates a library to store the runtime functions in to deploy to
runtimes that do not implement bytecode layouts. Right now, that is
everything. Once these are added to the runtime itself, it can be used
to deploy to old runtimes.

* Implement Destroy at Runtime Using LayoutStrings

If GenerateLayoutBytecode is enabled, Create a layout string and use it
to call swift_generic_destroy

* Add Resilient type and Archetype Support for BytecodeLayouts

Add Resilient type and Archetype Support to Bytecode Layouts

* Implement Bytecode assign/init with copy/take

Implements swift_generic_initialize and swift_generic_assign to allow copying
types using bytecode based witnesses.

* Add EnumTag Support

* Add IRGen Bytecode Layouts Test

Added a test to ensure layouts are correct and getting generated

* Implement BytecodeLayouts ObjC retain/release

* Fix for Non static alignments in aligned groups

* Disable MultiEnums

MultiEnums currently have some correctness issues with non fixed multienum
types. Disabling them for now then going to attempt a correct implementation in
a follow up patch

* Fixes after merge

* More fixes

* Possible fix for native unowned

* Use TypeInfoeBasedTypeLayoutEntry for all scalars when ForceStructTypeLayouts is disabled

* Remove @_GenerateBytecodeLayout attribute

* Fix typelayout_based_value_witness.swift

Co-authored-by: Gwen Mittertreiner <gwenm@fb.com>
Co-authored-by: Gwen Mittertreiner <gwen.mittertreiner@gmail.com>
2022-11-29 21:05:22 -08:00
Mishal Shah
9f3817c436 Add info about updating branch/tag in update-checkout script (#62299) 2022-11-29 12:20:13 -08:00
Doug Gregor
e1102cc098 Merge pull request #62204 from DougGregor/macro-declarations
Macro declarations
2022-11-29 10:04:09 -08:00
Max Desiatov
2a6570eb6b docs: convert ErrorHandling from .rst to .md
Resolves partially #49997.
2022-11-29 17:44:45 +00:00
swift-ci
279e24110a Merge pull request #62252 from apple/ktoso-patch-14
Fix CLion getting started, swift-syntax is also required now
2022-11-29 02:51:56 -08:00
Doug Gregor
d9f5aa0bcd [Mangling] Add a mangling for macro declarations.
Although macro declarations never produce any symbols in the compiled
binary, they can be referenced via USR, so introduce a mangling for
them.
2022-11-28 18:33:10 -08:00
swift-ci
6d2a3bbf9d Merge pull request #62266 from apple/maxd/docs-ac-stdlib
docs: convert `AccessControlInStdlib` from `.rst` to `.md`
2022-11-28 16:29:54 -08:00
Max Desiatov
88ad6982a7 docs: convert Arrays from .rst to .md (#62276)
Resolves partially #49997.
2022-11-28 19:06:48 +00:00
Max Desiatov
af472de5c9 docs: convert AccessControlInStdlib from .rst to .md 2022-11-27 11:33:59 +00:00
Konrad `ktoso` Malawski
bf03c71890 Fix CLion getting started, swift-syntax is also required now
Also include the swift-syntax path, otherwise CMake import in CLion will fail.
2022-11-26 12:16:24 +09:00
Erik Eckstein
e1d59b6817 docs: fix documentation for the @inline attribute 2022-11-21 10:03:51 +01:00
Anthony Latsis
c40a98abd8 Merge pull request #62156 from AnthonyLatsis/xcode-release
[docs] GettingStarted.md: Recommend building the `--release` variant of `--xcode`
2022-11-18 19:01:48 +03:00
Anthony Latsis
8bf1c3d3f2 [docs] GettingStarted.md: Recommend building the --release variant of --xcode
The `--release` variant takes up 4 times less space than the default `--debug`
variant (0.45GB vs 1.8GB).
2022-11-17 09:54:02 +03:00
Allan Shortlidge
0a24042cdd SIL: Introduce the has_symbol SIL instruction. 2022-11-16 16:07:26 -08:00
Max Desiatov
cac003b944 GettingStarted.md: refine wording for the Git version requirement 2022-11-13 17:10:15 +00:00
Luciano Almeida
da4bea88cc [Docs] Add note about debugging with --release-debuginfo build-script flag (#62048) 2022-11-13 07:58:58 -03:00
Max Desiatov
dabecb5929 HowToGuides/GettingStarted: require Git 2.x
Trying to run `update-checkout` with Git 1.8.3.1 fails during rebasing.
2022-11-12 11:38:56 +00:00
Slava Pestov
987552d53a Mangler: Add support for same-shape requirements 2022-11-12 02:13:54 -05:00
Anthony Latsis
9ad73a69a5 Merge pull request #62020 from AnthonyLatsis/getting-started-bootstrap-arm64
[docs] GettingStarted.md: Minor additions & amendments
2022-11-11 06:17:06 +03:00
Anthony Latsis
b5400ed9e5 [docs] GettingStarted.md: Minor amendments to instructions for setting up an Xcode workflow
* When an input path must be absolute, emphasize it.
* Get around an unnecessary placeholder in a path.
2022-11-10 07:52:42 +03:00
Anthony Latsis
e47444f153 [docs] GettingStarted.md: Warn about bootstrapping bug on Macs with arm64 chips
Also, suggest opting out of bootstrapping when appropriate.
2022-11-10 04:52:38 +03:00
omochimetaru
66a02b5980 Fix typo: complexAlgorithm -> myAlgorithm 2022-11-10 01:12:37 +09:00
omochimetaru
3c8f1cccfe Merge remote-tracking branch 'origin/main' into fix-typo 2022-11-10 01:12:18 +09:00
omochimetaru
40233024fc fix typo: "can can" 2022-11-09 09:21:37 +09:00
omochimetaru
b08d2612aa fix typo: "of of" 2022-11-09 09:20:19 +09:00
Slava Pestov
f2d1e8d2e9 AST: Invent mangling for PackType and PackExpansionType 2022-11-08 19:09:07 -05:00
Butta
4b22ca1550 [android][test] Fix two C++ Interop tests that were split off for Android, enable two more new ones, and set an executable_test
Also, make some related changes, like updating a path in the Android doc, making sure the
`unknown` vendor is always used, and using `CPU` instead of `CODEGENERATOR`.
2022-11-08 22:13:36 +05:30
Anthony Latsis
98ced88a32 [docs] GettingStarted.md: Make integration with Ninja the recommended Xcode workflow
...now that the build-script `--xcode` option implies `--skip-build`.
2022-11-06 03:36:24 +03:00
Alex Lorenz
a0d8ba2b1f Merge pull request #61913 from hyp/eng/generic-enum-init
[interop][SwiftToCxx] add support for constructing generic enum cases…
2022-11-04 09:38:14 -07:00