forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm from main #4710
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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.
Fixes rdar://97228088.
…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
…-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
…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.
…al use-def walking implementation
…-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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )