Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Jul 20, 2022

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

AnthonyLatsis and others added 30 commits June 16, 2022 19:07
…ociated type if

the conformance to the corresponding inherited protocol
- originates in a superclass
- originates in a different module
- and the current conformance have mismatching conditional requirements

This can turn out badly in two ways:
- Foremost, we must not *alter* conformances originating in superclasses
  or other modules. In other cases, we may hit an assertion in an attempt
  to overwrite an already recorded type witness with a different one.
  For example, the recorded type witness may be invalid, whereas the
  other one---valid, and vice versa.
- If the current conformance is more restrictive, this type witness may
  not be a viable candidate for the overridden associated type.
When `&` is misplaced it creates r-value -> l-value mismatch
in the code which is just a consequence and shouldn't be diagnosed.

Resolves: rdar://96631324
…onType.

Previously I thought that we would have @_noImplicitCopy change the
SILFunctionType (but not the AST level type). This caused other problems and was
unnecessary. So I removed all such changes in this commit. Specifically:

1. We no longer thread through no implicit copy in SILFunctionType.cpp.
2. noImplicitCopy no longer by default makes an argument an owned
argument. Instead we use the default convention and handle it appropriately.
…ough moveonlywrapped.

This ensures that we do not lose the move only wrapper from the input type if is
SILMoveOnlyWrapped.
…own in Swift

Creating new Interop - SwiftToCxx test
… syntax in generic context

Previously only static methods found on protocols were allowed but
it is reasonable to reference a typealias to perform an implicit call
to `.init` on its underlying type.

Resolves: rdar://88513939
…or SwiftCompilerSources

When using a unified LLVM + Swift build (using `LLVM_EXTERNAL_PROJECTS=swift`), swift is installed into `build_dir/tools/swift`. Thus, we also need to find the generated headers inside the `tools/swift/include` directory and not at the top-level `build_dir/include` directory.
Information about whether or not default expression is type-checked
is not going to be available for deserialized declaration and it's
not necessary for type requests anyway.

Resolves: rdar://95990526
This makes "owned" the default kind for records that have custom copy constructors and no pointer-members.
…nter types.

Previously types containing pointers would mark all C++ methods as unsafe.
Configuring extra stdlib toolchain content while not building the stdlib fails due to missing compatibility libraries.
…serConversion

In cases where matched concrete overload used a bridging, CF*, or
`AnyHashable` conversion, let's attempt generic overload choices
as well because one of them could produce a better solution e.g.
`RawRepresentable` for `==` where underlying type conforms to `Equatable`
has a better generic match than `(AnyHashable, AnyHashable) -> Bool`.

Resolves: rdar://95992916
…a value

Fixes a crash, because SILUndef's function is null.

rdar://97199428
SIL Optimizer: check for SILUndef before constructing a ValueSet for a value
DougGregor and others added 17 commits July 19, 2022 09:57
…-rdar97236936

RequirementMachine: Fix a request cycle
…ally-defined-in-fix

ASTMangler: Don't consider @_originallyDefinedIn when mangling local type discriminators
…idden-assoc

ConformanceChecker: Don't record a type witness for an overridden associated type if...
…r_to_copyable.

Specifically this means that rather than always being owned, we now have owned
and guaranteed versions of copyable_to_moveonlywrapper. Similar to
moveonlywrapper_to_copyable, one chooses which variant one gets by using
specific SILBuilder APIs:
create{Owned,Guaranteed}CopyableToMoveOnlyWrapperValueInst. It is still
forwarding and the rest of the forwarding APIs work as expected except that the
forwarding ownership is fixed (and an assertion will result if one attempts to
do so).

NOTE: It is assumed that trivial operands are always passed to the owned
variant.
Some mixed-language projects import Objective-C headers through their umbrella or bridging header that declare things that are actually implemented in Swift. This isn’t something we really supported or had tests for, but it happens in practice and we can’t break them.

Carve out a second exception to method conflict checking for when all of the conflicting methods are imported ObjC methods in either the same module or a bridging header.

Fixes rdar://96470068.
…implicit copy in favor of following normal convention.

I also added a bunch of tests for both the trivial/non-trivial case as well as
some docs to SIL.rst.
Fix a deserialization failure crash in `TBDGenVisitor`, where an
internal protocol conformance with a project internal symbol witness for
an `associatedtype` triggers a crash inside `addConformances` because
the module containing the project internal symbol is not available.

Fixes rdar://93983322
…to resolve

Instead of failing constraint generation by returning `nullptr` for an `ErrorExpr` or returning a null type when a type fails to be resolved, return a fresh type variable. This allows the constraint solver to continue further and produce more meaningful diagnostics.

Most importantly, it allows us to produce a solution where previously constraint generation for a syntactic element had failed, which is required to type check multi-statement closures in result builders inside the constraint system.
…nside a named pattern

We need this to resolve a test failure in optional.swift.
The issue has been fixed by allowing holes for variables in paterns.
…libs

[build-tooling-libs] Don’t configure extra stdlib content
beccadax and others added 11 commits July 20, 2022 02:04
…icitcopy

[no-implicit-copy] Use default param convention instead of forcing +1
This teaches ClangImporter to synthesize conformances of C++ iterator types to `UnsafeCxxInputIterator` protocol from the `Cxx` module.

We consider a C++ type to be an iterator if it defines a subtype (usually a typedef or a using decl) called `iterator_category` that inherits from `std::input_iterator_tag`.

rdar://96235368
* "merge" the `Path` and `State` in WalkUtils into a single `WalkingPath`. This makes it simpler for clients to configure a path and additional state variables. EscapeInfo now defines `EscapePath` which includes the projection path and EscapeInfo's specific state variables.
* Make the `WalkerCache` part of the WalkUtils, so that not all clients have to re-implement it.
* Rename `walkDownResults` -> `walkDownAllResults` and `walkUpOperands` -> `walkUpAllOperands` and make these functions client configurable.
…-for-tooling-libs

[CMake] Use CMAKE_CURRENT_BINARY_DIR as base for generated C header for SwiftCompilerSources
…rors

[CS] Don’t fail constraint generation for ErrorExpr or if type fails to resolve
…devirtualizer

Some improvements in WalkUtils and use the ValueUseDefWalker in the ReleaseDevirtualizer pass
…erator-conformance

[cxx-interop] Synthesize conformances to `UnsafeCxxInputIterator`
…/SwiftToCxxErrorHandling

[Interop] [SwiftToCxx] Implementing a naive exception to be thrown in C++ if an Error is thrown in Swift
@kateinoigakukun kateinoigakukun merged commit e33bf82 into swiftwasm Jul 20, 2022
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.