Commit Graph

4421 Commits

Author SHA1 Message Date
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
Robert Widmann
7944635f2e Merge pull request #61898 from CodaFi/i-write-syns-not-tragedies 2022-11-04 08:20:47 -07:00
Alex Lorenz
8336edd344 [interop][SwiftToCxx] add support for constructing generic enum cases in C++
We only support cases with no payload, or one associated value still
2022-11-03 12:21:27 -07:00
Robert Widmann
2d07f382c5 Delete _InternalSwiftSyntaxParser And Its Build Infrastructure
This is the start of the removal of the C++ implementation of libSyntax
in favor of the new Swift Parser and Swift Syntax libraries. Now that
the Swift Parser has switched the SwiftSyntaxParser library over to
being a thin wrapper around the Swift Parser, there is no longer any
reason we need to retain any libSyntax infrastructure in the swift
compiler.

As a first step, delete the infrastructure that builds
lib_InternalSwiftSyntaxParser and convert any scripts that mention
it to instead mention the static mirror libraries. The --swiftsyntax
build-script flag has been retained and will now just execute the
SwiftSyntax and Swift Parser builds with the just-built tools.
2022-11-02 10:35:29 -07:00
Valeriy Van
a8da90d3fb Fix wrong variable type 2022-11-02 16:58:47 +02:00
Valeriy Van
17f70c9626 Fix typo 2022-11-02 14:27:54 +02:00
Valeriy Van
ddbefc55ea Fix punctuation: use commas before and after 'for example' 2022-11-02 14:26:20 +02:00
Valeriy Van
f89947b0e0 Fix typo: were -> was 2022-11-02 14:11:59 +02:00
Doug Gregor
f184504d62 Merge pull request #61845 from DougGregor/getSourceFileContainingLocation-LRU
Introduce an LRU cache for getSourceFileContainingLocation()
2022-11-01 13:07:19 -07:00
Anthony Latsis
c0abe0baf2 Merge pull request #61713 from AnthonyLatsis/ninja-with-xcode
[docs] Improve instructions for using Ninja with Xcode & move them to GettingStarted.md
2022-11-01 22:19:28 +03:00
Doug Gregor
0f9a70601a Parse and record top-level "items" rather than always forcing declarations.
In the Swift grammar, the top-level of a source file is a mix of three
different kinds of "items": declarations, statements, and expressions.
However, the existing parser forces all of these into declarations at
parse time, wrapping statements and expressions in TopLevelCodeDecls,
so the primary API for getting the top-level entities in source files
is based on getting declarations.

Start generalizing the representation by storing ASTNode instances at
the top level, rather than declaration pointers, updating many (but
not all!) uses of this API. The walk over declarations is a (cached)
filter to pick out all of the declarations. Existing parsed files are
unaffected (the parser still creates top-level code declarations), but
the new "macro expansion" source file kind skips creating top-level
code declarations so we get the pure parse tree. Additionally, some
generalized clients (like ASTScope lookup) will now look at the list
of items, so they'll be able to walk into statements and expressions
without the intervening TopLevelCodeDecl.

Over time, I'd like to phase out `getTopLevelDecls()` entirely,
relying on the new `getTopLevelItems()` for parsed content. We can
introduce TopLevelCodeDecls more lazily for semantic walks.
2022-11-01 08:04:15 -07:00
swift-ci
02e537ffad Merge pull request #61790 from valeriyvan/generics-fixes
Fix typos in Compiling Swift Generics documentation
2022-10-29 11:39:53 -07:00
Valeriy Van
2bb34e3aa7 Fix typo 2022-10-28 19:41:38 +03:00
Valeriy Van
afb0249d58 Fix typo 2022-10-28 19:00:11 +03:00
Valeriy Van
563bf20d81 Fix typo 2022-10-28 18:56:55 +03:00
Nate Chandler
ed623d7b64 [NFC] Shortened SIL [init] flag.
Instead of writing out [initalization] for some instructions, use [init]
everywhere.
2022-10-27 10:38:54 -07:00
Anthony Latsis
712dc7b882 [docs] GettingStarted.md: Remove dual Ninja-Xcode workflow description
We deprecate this option in favor of integrating a Ninja build with Xcode
2022-10-27 07:21:12 +03:00
Anthony Latsis
7c84923239 [docs] Move instructions for using Ninja with Xcode to GettingStarted.md 2022-10-27 07:21:12 +03:00
Anthony Latsis
7532e1d92a [docs] Improve instructions for using Ninja with Xcode 2022-10-27 07:21:02 +03:00
Alex Kladov
f5f8fa888b Correct typo in generics.tex
I am not sure what is wrong: the text or my understanding of upstream/downstream terminology, but it seems that nameres happens before generics, and nameres results *flow* into generics, so it must be upstream, right?
2022-10-25 10:26:29 +01:00
Anthony Latsis
a358701255 [docs] Fix a typo in an invocation 2022-10-25 09:29:01 +03:00
swift-ci
699c0d32fc Merge pull request #61673 from adrian-prantl/syntax
Fix syntax error in SIL documentation
2022-10-21 19:13:53 -07:00
Adrian Prantl
740fa24b94 Fix syntax error in SIL documentation 2022-10-21 15:08:25 -07:00
Nate Chandler
2f18af8979 [Test] Allowed referring to block arguments. 2022-10-21 13:58:42 -07:00
nate-chandler
573c417fd5 Merge pull request #61656 from nate-chandler/test/20221020/1
[Test] Added a few conveniences.
2022-10-21 06:50:17 -07:00
Becca Royal-Gordon
82d78a384f Merge pull request #60630 from beccadax/at-implementation
Add @_objcImplementation
2022-10-20 17:14:21 -07:00
Nate Chandler
8397a215d9 [Test] Allow specifying blocks by offset. 2022-10-20 13:34:13 -07:00
Nate Chandler
0d7d8911a4 [Test] Allow specifying instructions by offset.
Make @instruction[+1] refer to the instruction after the "current"
instruction, @instruction[-1] the one before, and so on.
2022-10-20 13:34:13 -07:00
Nate Chandler
b9a8334756 [Test] Contextualized bare test_spec refs.
Made bare @instruction and @block more useful.  Rather than referring to
the first instruction and block in the current function, instead, they
now refer to the instruction after the test_specification instruction
(which must always exist) and the block containing the
test_specification instruction.
2022-10-20 13:34:13 -07:00
nate-chandler
513b9cbb4d Merge pull request #61495 from nate-chandler/rdar90412220
[SILOptimizer] Add deinit-barrier side-effect.
2022-10-19 18:21:26 -07:00
Anthony Latsis
d64def279d [docs] GettingStarted.md: Do not suggest to run tests when building toolchain
* Running the entire test suite is unnecessarily burdensome for newcomers, given
  the already considerable build times.
* Test failures are not a beginner-friendly indication of an out-of-sync
  checkout, nor is such an indication generally worth the expenses.
* We do not want a known issue to block anyone’s workflow.
2022-10-19 21:51:02 +03:00
Nate Chandler
7ea336367d [NFC] Port isDeinitBarrier to Swift.
Added new C++-to-Swift callback for isDeinitBarrier.

And pass it CalleeAnalysis so it can depend on function effects.  For
now, the argument is ignored.  And, all callers just pass nullptr.

Promoted to API the mayAccessPointer component predicate of
isDeinitBarrier which needs to remain in C++.  That predicate will also
depends on function effects.  For that reason, it too is now passed a
BasicCalleeAnalysis and is moved into SILOptimizer.

Also, added more conservative versions of isDeinitBarrier and
maySynchronize which will never consider side-effects.
2022-10-18 21:23:22 -07:00
Becca Royal-Gordon
e544c21f99 Make all internal-or-more @_objcImpl members impls 2022-10-18 17:21:56 -07:00
Becca Royal-Gordon
f2a0ab79c7 Add basic Sema support for @_objcImplementation
Does not validate members yet; nor does it emit different metadata.
2022-10-18 17:21:56 -07:00
Slava Pestov
86fac9ab70 docs: Compiling Swift Generics, Part I 2022-10-16 19:37:02 -04:00
Allan Shortlidge
6e07c8cfe1 Mangling: Add a mangling for #_hasSymbol query functions. 2022-10-13 21:00:24 -07:00
Nate Chandler
ab35362056 [SIL] Added new test_specification instruction.
The new instruction exists only to be used in tests.  The idea is to
specify tests that ought to be run "in the context" of the containing
function.
2022-10-11 17:15:13 -07:00
swift-ci
f9d7ac715b Merge pull request #61511 from buttaface/doc
[docs] fix formatting for GettingStarted.md and add needed flag for linux
2022-10-10 09:55:38 -07:00
Kavon Farvardin
6f712cec4c Add tip of using dry-run flag; mention build dir setting. 2022-10-09 17:24:06 -07:00
Butta
f0dcc4839b [docs] fix formatting for GettingStarted.md and add needed flag for linux 2022-10-09 21:11:09 +05:30
Alex Lorenz
ac3dc6a579 [interop][SwiftToCxx] clarify Swift to C++ status doc
More clarification for the status doc.
2022-10-07 15:04:12 -07:00
Alex Lorenz
73e9f27968 Merge pull request #61491 from apple/eng/updated-docs-status-interop
[interop][SwiftToCxx] update status doc for class init support
2022-10-07 14:52:48 -07:00