forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
[pull] swiftwasm-release/5.3 from release/5.3 #1478
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
The meaning of EnableConcisePoundFile is going to shift slightly, so it makes sense to always include #filePath in completions. Also, @rintaro confirmed that this should be using KeywordKind::pound_filePath, not KeywordKind::pound_file.
Extracts the list of magic identifier literal kinds into a separate file and updates a lot of code to use macro metaprogramming instead of naming half a dozen cases manually. This is a complicated change, but it should be NFC.
Doing this NFC renaming first helps clarify the functional changes to come. # Conflicts: # lib/SILGen/SILGenConvert.cpp
…and modify resolveFileIDConflicts() to diagnose any such violations instead of asserting. Swift does not allow any two files in the same module to have the same filename, even if they are in different directories. However, this is enforced in the driver, so tests that invoke the frontend directly can violate it. Turns out that a couple of those snuck into the test suite at various points. This commit updates those tests. It also causes the frontend to diagnose the duplicate filename error just as the driver would have, which should help us understand what happened more easily if this crops up again in the future. NFC, since invoking the frontend directly is unsupported.
This temporarily breaks -enable-experimental-concise-pound-file. fixup adding #fileID # Conflicts: # lib/SILGen/SILGenConvert.cpp
Such as force unwraps, as! casts, etc. # Conflicts: # lib/SILGen/SILGenConvert.cpp
In -swift-version 5 and earlier, #file will continue to be a synonym for #filePath; in a future -swift-version (“Swift 6 mode”), it will become a synonym for #fileID. #file in libraries will be interpreted according to the language mode the library was compiled in, not the language mode its client uses. Implement this behavior, tied to a frontend flag instead of a language version. We do so by splitting the old `MagicIdentifierLiteralExprKind::File` into two separate cases, `FileIDSpelledAsFile` and `FilePathSpelledAsFile`, and propagating this distinction throughout the AST. This seems cleaner than looking up the setting for the module the declaration belongs to every time we see `File`. This doesn’t handle module interfaces yet; we’ll take care of those in a separate commit. # Conflicts: # lib/Serialization/ModuleFormat.h
Add -experimental-enable-concise-pound-file to the list of flags preserved by module interfaces, so that when we rebuild an interface, it comes out the same way as the original file.
This change makes: * #file compatible with #fileID in “Swift 6 mode” * #file compatible with #filePath and #fileID in Swift 5 mode * #file in Swift 5 mode code compatible with #file in “Swift 6 mode” code This should keep anyone from seeing XCTAssert-wrapping noise until they adopt “Swift 6 mode” (whatever version that ends up actually being).
We ultimately want to explicitly change standard library uses of #file to #fileID, but once we do, previous compilers won’t be able to build the standard library. So instead, we will temporarily build the standard library with -enable-experimental-concise-pound-file, which should have the same effect, but will back-deploy to compilers going back several months.
…te interface Print implementation-only imports in the private textual interface only if also importing SPI. This allows to export types from implementation-only imports in SPI and brings the private textual interfaces in line with the binary interfaces. This is a temporary solution as we need to better design the language feature around this. This feature requires passing -experimental-spi-imports to the frontend that generates the private swiftinterface file.
… storage rdar://65690805
The maybeResolveEquivalenceClass() method can deallocate equivalence classes, because it calls updateNestedTypeForConformance(), which calls addSameTypeRequirement(). Therefore, the EquivalenceClass stored inside a ResolvedType could become invalid across calls to maybeResolveEquivalenceClass(). This was a problem in one place in particular, when adding a new same-type constraint between two type parameters. Fix this by not caching the equivalence class of a PotentialArchetype in the ResolvedType implementation. The only time an equivalence class is now stored is when returning an unresolved type, which is acted upon immediately. Fixes <https://bugs.swift.org/browse/SR-12812>, <rdar://problem/63422600>.
`PreCheckFunctionBuilderRequest` applies `PreCheckExpression` to the expressions inside the function body. Previously it used to receive only `AnyFunctionRef` (`FunctionDecl` or `ClosureExpr`) as the parameter. However, when fast-completion kicks-in, it replaces the body of the function, then tries to call `PreCheckFunctionBuilderRequest` again, with the same function decl as before. It used to return cached "Success" result, but it didn't actually apply `PreCheckExpression`. So any `UnresolvedDeclRefExpr` remained unresolved. In this patch, make `PreCheckFunctionBuilderRequest` receive "body" of the function as well, so it doesn't return the cached result for the *previous* body. rdar://problem/65692922 (cherry picked from commit e953e52)
…torage-5.3 [5.3][Sema] SPI info on a wrapped property should propagate to the backing storage
[5.3][ModuleInterface] Print some implementation-only imports in the private interface
…ar65692922 [5.3][CodeCompletion] Fast completion inside function builder function
…tlang#32957) - Refactor Mirror.descendents - Add _Either sequence - Create custom reflected children type - Switch Mirror to use _Either Co-authored-by: Ben Cohen <airspeedswift@users.noreply.github.com>
* Add fast string interpolation for metatypes (swiftlang#32113) * Whitespace fixes Co-authored-by: Ben Cohen <airspeedswift@users.noreply.github.com>
…nary-5.3 [5.3] Revise #file changes from SE-0274
…g type classification (swiftlang#32949)
…crete-crash-5.3 GSB: Fix use-after-free error when vending ResolvedType [5.3]
MaxDesiatov
approved these changes
Jul 18, 2020
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]. Want to support this open source service? Please star it : )