forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Merge main 2020-11-11 #2191
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
Merge main 2020-11-11 #2191
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
…e table is sufficiently small.
Add benchmarks for subscripts, max, min
Fixes mem usage of run_IndexPathSubscriptRangeMutation
initClassFieldOffsetVector writes the instanceStart and size to the class's rodata. In some cases they already match, and this write will dirty memory unnecessarily, and prevent the compiler from emitting those rodatas into read-only memory. rdar://problem/71119533
We don't expect swiftinterface files to have anything meaningful to report from these checks anyhow - they will have been run at module generation time anyways. In fact, the linked radar demonstrates how this kind of checking can be detrimental to the usability of the compiler. The test committed here declares the CoreFeatures framework, an Objective-c (root) class and a set of Objective-C protocols. Now for the fun part: The Objective-C class is made to conform to the Objective-C protocols in a Swift extension. This extension is then printed into the generated CoreFeatures-Swift header and made available to clients of the module. Now, because we have an Objective-C protocol and a base class that is imported from Objective-C, we mirror-in the members of RootProtocol. The sum total of the monster we have built is that we now have a Swift class that implements some requirements, and an Objective-C protocol that has requirements mirrored into that same class. The result is a raft of spurious selector conflict diagnostics that the user cannot work around unless they own both the class and the protocol. Exempt swiftinterface files from this checking. rdar://69550935
The test is very flaky. It works and stops working randomly for no apparent reason. To avoid future problems, and since VS2019 keeps working without these problems, mark the tests as unsupported to avoid the noise. See also swiftlang#34143 and swiftlang#34625.
AccessPath was treating init_enum_data_addr as an address base, which is not ideal. It should be able to identify the underlying enum object as the base. This issue was caught by LoadBorrowImmutabilityChecker during SIL verification. Instead handle init_enum_data_addr as a access projection that does not affect the access path. I expect this SIL pattern to disappear with SIL opaque values, but it still needs to be handled properly after lowering addresses. Functionality changes: - any user of AccessPath now sees enum initialization stores as writes to the underlying enum object - SILGen now generates begin/end access markers for enum initialization patterns. (Originally, we did not "see through" init_enum_data_addr because we didn't want to generate these markers, but that behavior was inconsistent and problematic). Fixes rdar://70725514 fatal error encountered during compilation; Unknown instruction: init_enum_data_addr)
Enable Windows specific availability annotations in Swift.
Let's point out the associated type with a separate note, so that we can diagnose other availability failures, such as deprecation and OS version availability.
This replaces the old exportability check with a call into the new general conformance availability check entry point. Part of <rdar://problem/35158274>.
Adds a new frontend option "-experimental-allow-module-with-compiler-errors". If any compilation errors occur while generating the .swiftmodule, this mode will skip SIL entirely and only serialize the (likey invalid) AST. This existence of this option during generation is serialized into the resulting .swiftmodule. Errors found in deserialization are only allowed if it is set. Primarily intended for IDE requests (eg. indexing and code completion) to ensure robust cross-module results, despite possible errors. Resolves rdar://69815975
[benchmark] Add benchmarks for IndexPath's subscripts, max, min
[Runtime] Don't write to rodata if values already match.
Some of the bots in CI run multiple jobs, so we need to be sure libdispatch compilations do not attempt to share the module cache. Addresses rdar://68100533
AccessPath: Add init_enum_data_addr to "access projections" set.
This test was intended to catch a crash on invalid offset, but in rare cases it was failing spuriously, because the error message depends on non-deterministic behaviour. It's sufficient for this test that it doesn't crash. rdar://63187529
…-of-the-compiler Exempt Swift Interface Files From Whole-Module ObjC Errors
… CompilerInstance This will allow individual module scans in batch-scanning mode to share the already-scanned Swift and Clang modules, and avoid instantiating a brand new Clang `DependencyScanningService` for each batch entry. Performance-improvement anecdote: A simple experiment which performs a batch scan of all modules involved in planning a build of SwiftPM (using SwiftPM in explicit module build mode), which includes 126 batch entries (scan entry-points), with 21 distinct Swift modules and 27 distinct Clang modules (many Clang modules are scanned multiple times, at different target versions), this modification reduces the total time taken from ~34 seconds to ~6.
…ad of using optional. At Andy's request. If it creates too much noise in covered switches, we may go back to the original.
…d-msvc-2017-test [windows] Mark crash-in-user-code as UNSUPPORTED in VS2017
AST: support availability on Windows
…hmap-inline-indices [Runtime] Have ConcurrentReadableHashMap store indices inline when the table is sufficiently small.
[test] Fix test/SourceKit/CursorInfo/invalid_offset
…d6843521b63d70405f75d65 [ownership] Convert ValueOwnershipKind to have an Invalid state instead of using optional.
…hold [NFC] Add back a higher polynomial threshold for rdar18360240.swift.gyb
…ache [Dependency Scanner] Share `ModuleDependenciesCache` as a part of the CompilerInstance
…elativeAddress [stdlib][NFC] Resolve relative address in consistent way
…815975 [Serialization] Add an option to output modules regardless of errors
CMake: generate SupportedFeatures.json while building and install it into toolchain
…-availability Check conformance availability for associated conformances
MaxDesiatov
approved these changes
Nov 11, 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.
No description provided.