forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Fix issues when merging the main
branch
#3032
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
Apparently, even with Dispatch running on Linux, these tests are unsupported on those platforms. These also fail on OpenBSD, so presumably these should be marked unsupported on this platform too.
There are a number of occurances that create implicit `Switch`s by passing `SourceLoc()` for all location paramters. Refactor those occurances out to a separate `createImplicit` method that automatically fills the locations with invalid source locations.
When the whole module has an SPI distribution, SPI declarations can be used in API. rdar://75335462
…call RAUW directly rather than calling the default setUseValueFunc. This guarantees that a default InstModCallback() call to RAUW doesn't have any overhead. Just a little optimization I saw.
This enables passes to use this as a utility that properly composes with how the pass maintains its state. If an InstModCallback isn't passed in, we use the default InstModCallback which should be cheap (always succeeding check for nullptr + call inline default callback).
The `async` operation is a global function that initiates asynchronous work on behalf of the synchronous code that calls it. Unlike `detach`, `async` inherits priority, actor context, and other aspects of the synchronous code that initiates it, making it a better "default" operation for creating asynchronous work than `detach`. The `detach` operation is still important for creating truly detached tasks that can later be `await`'d or cancelled if needed. Implements the main entry point for rdar://76927008.
…es-to-help-gyb-for-swift-syntax [libSyntax] Added helper variables and methods for SwiftSyntax gyb
…itch-stmt [AST] Add method to create an implicit `SwitchStmt`
When a function declaration has no body (e.g. because it’s a protocol requirement), we construct the range to replace by the `async` keyword as follows: - Start: One character after the closing `)` (or potentially the `throws` keyword if it exists) - End: Last token in the function declaration Since the last token in the function declaration is the `)`, we end up with a range that has `End < Start`, which crashes when trying to print the range. If the function has no body, we should just use the range’s start location as the end location to construct an empty range. Fixes rdar://76677035
[Testing] Unbreak minimal Swift builds
…347326b8dfcc4da2fb6c45e [inst-opt-utils] If InstModCallback::setUseValueFunc isn't set, just call RAUW directly rather than calling the default setUseValueFunc.
…4a3237f2dfe6fec12673023 [ownership] Change CanonicalOSSALifetime to use an InstModCallback.
…s to type in @_implementationOnly module In the added test case, the `typealias` refers to the `HiddenStruct` type in the private module, which is imported as `@_implementationOnly`. Because the import is `@_implementationOnly`, during deserialization, we don’t import the private module and hence any reference to the `HiddenStruct` type fails. In the common deserialization code path, this causes us to skip over the `typealias` member. However, when creating the protocol conformance, we assume that we can resolve the type to which the `typealias` refers and thus we are crashing. If `LangOpts.EnableDeserializationRecovery` is set to `true`, we should do our best to recover from such failures so this patch makes the deserialization failure handling more graceful and resolve the right-hand side of the `typealias` as an `ErrorType`. Fixes rdar://72891807
…requirement-async [Refactoring] Fix crash when refactoring protocol requirement to async
… can recognize a composed property wrapper’s wrapped value type.
… wrapper mismatch in DiagnosticsSema.def and made changes to show the new composed property wrapper mismatch type diagnostic in both CSDiagnostics.cpp and CSDiagnostics.h.
…here the wrappedValue type of a property wrapper was determined and added necessary logic so that a constraint locator can recognize a composed property wrapper’s wrapped value type in CSFix.cpp, CSFix.h, and CSSimplify.cpp.
…est in property_wrappers.swift
…to improve error handling for composed wrapped value mismatches
[Concurrency] Add "async" operation for continuing work asynchronously.
the new driver fails when running this test, because the file map and the command-line specify the same module output for both the individual swift file and the module as a whole
SWIFT_CLASS_IS_SWIFT_MASK is optionally defined to a global variable _swift_classIsSwiftMask, which allows the runtime to choose the appropriate mask when running on OS versions earlier than macOS 10.14.4. This is no longer a supported target for newly built runtimes (Swift apps built with such a target will embed a copy of the back deployment runtime, which is separate) and this global is no longer useful. Instead, unconditionally define SWIFT_CLASS_IS_SWIFT_MASK to 2 on Apple platforms, which is the correct value for current OS versions. rdar://48413153
In case the compiler is used with concurrency features enabled (by-default or otherwise), and an older SDK is used which does not include the `_Concurrency` module, do not load this module implicitly. Instead, emit a diagnostic indicating that no such module is found. rdar://76967260
In theory we could map opened archetypes per module because opened archetypes _should_ be unique across the module. But currently in some rare cases SILGen re-uses the same opened archetype in multiple functions. The fix is to add the SILFunction to the map's key. That also requires that we update the map whenever instructions are moved from one function to another. This fixes a compiler crash. rdar://76916931
…d by normal arg For a function and call like ```swift func test(_: Foo..., yArg: Baz) {} test(.bar, #^COMPLETE^#) ``` the parser matches the code completion token to the `yArg` with a missing label, because this way all parameters are provided. However, because of this we don’t suggest any variables that could belong the the previous vararg list. To fix this, if we encounter such a situation (argument without label after vararg), manually adjust the code completion token’s position in params to belong to the vararg list. Fixes rdar://76977325 [SR-14515]
…is-swift-mask [Runtime] Remove the _swift_classIsSwiftMask variable.
For async function async function pointers will be stored in dynamic replacement records. rdar://77072669
…mapping SILModule: track opened archetypes per function.
We need to emit a full async suspend sequence when calling the replacement. rdar://77072724
…apper_improved_error_handling Improved error handling for composed property wrapper mismatches
…eavus/supplementary-symbol-graph Revert "[Driver][Frontend] add the symbol graph dir to the supplementary file map"
…nterpreter_async_arm64e
…etion [CodeCompletion] Fix code suggestions for arguments in vararg followed by normal arg
[Deserialization] Fix error when typealias required by protocol refers to type in @_implementationOnly module
…epl_runtime Runtime: Fix async dynamic replacements
…epl_compiler IRGen: Fix async dynamic replacements
Actor inheritance was removed in the second revision of SE-0306. Remove the ability to inherit actors. Note that this doesn't fully eliminate all vestigates of inheritance from actors. There are simplifications that need to be performed still, e.g., there's no need to distinguish designated/convenience/required initializers. That will follow.
absense -> absence
[ConstraintGraph] Fix typo
…heckedcast-warn [Sema] Do not attempt warn extraneous checked cast for placeholder types
kateinoigakukun
approved these changes
Apr 26, 2021
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.
Submitted upstream as swiftlang#37059