Skip to content

Merge main 2022-03-24 #4388

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 123 commits into from
Mar 24, 2022
Merged

Merge main 2022-03-24 #4388

merged 123 commits into from
Mar 24, 2022

Conversation

kateinoigakukun
Copy link
Member

No description provided.

atrick and others added 30 commits March 9, 2022 17:18
Merge the AddressLowering pass from its old development branch and update
it so we can begin incrementally enabling it under a flag.

This has been reimplemented for simplicity. There's no point in
looking at the old code.
This could happen as a result of specialization or concrete
address-only values.

For now, it's just tested by SIL unit tests.
Mostly documentation and typos.
Compute the latestOpeningInst, not the firstOpeningInst.
In classic compiler terminology, this is a "phi copy" algorithm. But
the documentation now tries to clearly distinguish between "semantics
copies" vs. moves, where moves are "storage copies".
Explain high-level objectives and terminology with more precision.
Avoid attempting to coalesce enum payloads.
The library `six` provides compatibility between Python 2, and 3. It's no
longer necessary once we migrate of Python 2 completely.

Also remove any custom logic for Python 2 (the ones referenced by
a commentanyways).

https://bugs.swift.org/browse/SR-16025
I'm making two cleanups here. First, the closure going into
`_runAsyncMain` needs to be `@Sendable` or passing it to the task is not
safe. This will also result in a warning being emitted.
Second, I'm making this @usableFromInline and `internal`. This function
is around for legacy reasons, but it's part of the ABI, so we can't pull
it out entirely, but we don't want folks using it.
Adding `_runAsyncMain` to the api-digester list since we're adding
`@preconcurrency` when we add `@Sendable`. These two should negate each
other, but the api-digester isn't quite smart enough to understand that.
Allow clients to check whether they can force empty ABI descriptors to
be output.
…ers to dependent types

Importing `type_traits` from libstdc++ currently causes a crash on Linux:
```
swift-ide-test: tools/clang/include/clang/AST/TypeNodes.inc:33: clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type *) const: Assertion `!T->isDependentType() && "should not see dependent types here"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/egorzh/Builds/swift/swift/bin/swift-ide-test -print-module -module-to-print=std -source-filename=x -enable-cxx-interop
1.	/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits:1110:10: importing 'std::__do_is_implicitly_default_constructible_impl'
2.	/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/type_traits:1116:22: importing 'std::__do_is_implicitly_default_constructible_impl::__test'
```

This change fixes the crash by bailing on such functions.
swift-ci and others added 26 commits March 22, 2022 19:00
…onisolated

Downgrade more errors into warnings for actor inits.
…plicit

Restrict the warning to diagnose only explicit instances of `self` reference
that do not mention the parent type via dot syntax e.g. `MyStruct.self`.

Resolves: SR-15897
Resolves: SR-15691
Resolves: rdar://90624344
…opaque archetypes

Also fix a weird latent bug. In lookupConcreteNestedType(), we would
push nullptr onto the concreteDecls vector if the opaque archetype
did not have a nested type with this name. However, this did not
turn out to be a problem, since in this code path we would only
have a single element in this vector, and the later call to
std::min_element() did not end up dereferencing the null pointer.

However this is very dodgy, so tweak the code to prevent this from
happening and add a test case (which already passed anyway).
[NFC] Three cleanups in the metadata ABI header
…ilability

SE-0340: `noasync` availability kind
[MiscDiagnostics] Produce warnings about confusable `self` iff its ex…
[Diagnostics] Fix out-of-bounds index while fixing argument mismatch
…deployed-originals

SIL: Avoid serializing the bodies of the original copies of @_backDeploy functions
Implicit casts are allowed to provide cast type directly without
a type repr, adjust solution application logic to handle this just
like constraint generator does. Also fix a couple of places where
declaration context from constraint system was used instead
of one associated with the expression rewriter.
…ion_and_hoist

[move-function] Add support for propagating from vars
…g/define-valuestoragemap-dump-in-debug

Only define ValueStorageMap::dump in DEBUG.
[NFC] Move generic contexts and metadata references into separate headers
…ype-tests

RequirementMachine: Better tests for concrete type requirements with opaque archetypes
…wiftlang#41942)

In swiftlang#40610 some options were moved into `StdlibOptions.cmake`, but that
file is only included from `stdlib/CMakeLists.txt` and
`cmake/modules/StandaloneOverlay.cmake`. However, if one does not build
neither the dynamic nor the static standard library, but enables
building the "toolchain extras" with
`SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT` `stdlib/CMakeLists.txt`
will not be included, but `stdlib/toolchain/CMakeLists.txt` will, which
uses a value from `StandardOverlay.cmake` that will not be provided the
correct default value and will skip building most of what
`SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT` used to do.
Was missing some platforms causing certain builds to fail.
Adding SwiftStdlib availability annotation, which should cover all of
them.
[nfc-5.7] Initial round of SILGen fixes and tests for opaque value
[CSGen/CSApply] Don't expect implicit casts to have type reprs
…n-docs

Add diagnostic verifier features to Diagnostics.md
Write the real module name for XRefs in swiftmodule files instead of the
exported module name, from `export_as` declarations in module maps.
Swiftmodule files are internal details now, they should represent the
truth.

We keep using the exported module name for the extensions lookup table
as clients should still use the exported name. However we may need to
write both alternatives in the lookup table in the future if extensions
can't be found from clients not importing the exported as module.

rdar://90272035
…n-multiple-ifdef

Only use SIMD when stdlib vector types are available
[Serialization] Ignore the exported module name for XRefs
…ity-annotations

Use SwiftStdlib availability
@kateinoigakukun kateinoigakukun merged commit 2b3a974 into swiftwasm Mar 24, 2022
@kateinoigakukun kateinoigakukun deleted the katei/merge-main-2022-03-24 branch April 20, 2022 08:46
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.