Skip to content

Merge main 2022-09-17 #4906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 135 commits into from
Sep 19, 2022
Merged

Merge main 2022-09-17 #4906

merged 135 commits into from
Sep 19, 2022

Conversation

kateinoigakukun
Copy link
Member

No description provided.

AnthonyLatsis and others added 30 commits September 4, 2022 07:02
Ensure that LLVM doesn't optimize out a profiler
increment before lowering it, ensuring its name
gets recorded.
Validating these files creates a load of false positive error cases
since the new Swift parser doesn't handle SIL. Disable validating
these files.
This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
For two reasons:
* We also like to check for assert failures in release builds. Although this could be achieved with `precondition`, it's easy to forget about it and use `assert` instead.
* We need to see the error message in crashlogs of release builds. This is even not the case for `precondition`.

Also, re-export the "Basic" module in "SIL" so that the new assert implementation is also available in the Optimizer module (where all files import SIL).
…ion`

It's better to use the new assert implementation (defined in the "Basic" module) than Swift's `precondition`
Allow tests to run with a different number of
workers than build jobs if desired.
Define our own `assert` implementation for the swift compiler sources
Load task status with an acquire when canceling a task, to synchronize with the store-release that comes when updating a task's status.

Add explicit TSan calls in cancellation, as well as withStatusRecordLock and addStatusRecord, to avoid TSan complaining about data races when canceling a task.

Add a test that checks for TSan-reported data races when canceling a task.

rdar://93892417
Add `_ZNSt6vectorISsSaISsEE17_M_realloc_insertIJSsEEEvN9__gnu_cxx17__normal_iteratorIPSsS1_EEDpOT_`, which is a slight variation on one of the existing ignored symbols for std::vector::_M_realloc_insert.

rdar://99888061
…in for-in

Reference to `makeIterator` in for-in loop context needs to be
treated as a reference to a witness of `Sequence#makeIterator`
requirement, otherwise it could lead to problems with retroactive
conformances.
Reference to `$geneator.next` in for-in loop context needs to be
treated as a reference to a witness of `IteratorProtocol#next`
requirement, otherwise it could lead to problems with retroactive
conformances.
Amritpan Kaur and others added 23 commits September 16, 2022 09:17
Nest failed, added, and removed constraints inside block called
`simplification result`.
Handle OperandOwnerhip::NonUse in PrunedLiveness::computeSSALiveness.
…nuation usage.

When enabled, we track all active unchecked continuations in a global set, and fatal error if one is called twice.

rdar://97390481
…nal types in swiftSymbolGraphGen (swiftlang#59047)

This includes:
 - bumping the SWIFT_SYMBOLGRAPH_FORMAT_MINOR version
 - introduction of the "swift.extension" symbol and "extensionTo" relationship
 - adding support for ExtensionDecl to the Symbol class
 - adding a "typeKind" field to the symbol's extension mixin which indicates what kind
   of symbol was extended
 - intoduction of the -emit-extension-block-symbols flag, which enables the behavior
   outlined below
 - adaptions to SymbolGraphASTWalker that ensure a swift.extension symbol is emitted
   for each extension to a type that does not exist in the local symbol graph
 - adaptions to SymbolGraph and SymbolGraphASTWalker that ensure member and conformance
   relationships are correctly associated with the swift.extension symbol instead of
   the original type declaration's (extended nominal's) symbol where applicable
 - adaptions to SymbolGraphASTWalker that ensure swift.extension symbols are connected
   to their respective extended nominal's symbol using an extensionTo relationship

Testing:
- adds SymbolGraph tests that test behavior only relevant in
  -emit-extension-block-symbols mode
- adapts some SymbolGraph tests to additionally test similar behavior for
  extensions to external types in -emit-extension-block-symbols mode
- adapts some SymbolGraph tests to (additionally or exclusively) test the
  behavior with -emit-extension-block-symbols mode enabled

Bugfixes:
- fixes a bug where some conformsTo relationships implicated by the conformances
  declared on an extension to an external type were not emitted
  (see test/SymbolGraph/Relationships/ConformsTo/Indirect.swift)

Further changes:
- documents the strategy for naming and associating children declared in extensions
  to typealiases (see test/SymbolGraph/Relationships/MemberOf/Typealias.swift,
  test/SymbolGraph/Symbols/Names.swift)
[Sema] Revert enabling require-explicit-availability for public modules by default
This gives LLDB's CMake build access to the build directory.
…S version if present.

When computing the availability of a `SILFunction` for linkage the OS version specified in the `@_backDeploy` attribute should be preferred over the version in the `@available` attribute. This ensures that the corresponding symbol is weakly linked when deploying to older OSes than the back deploy "before" version.

Resolves rdar://99962885
…alidation

[Concurrency] Add an environment variable to validate unchecked continuation usage.
[ConstraintSystem] Print constraint simplification in type inference debug output
…ite-to-gh-issues-20

Gardening: Migrate test suite to GH issues p. 20
…ite-to-gh-issues-21

Gardening: Migrate test suite to GH issues p. 21
@kateinoigakukun kateinoigakukun marked this pull request as ready for review September 19, 2022 11:25
@kateinoigakukun kateinoigakukun merged commit 8e2626e into swiftwasm Sep 19, 2022
@kateinoigakukun kateinoigakukun deleted the katei/merge-main-2022-09-17 branch September 19, 2022 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.