forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Merge master 2020-07-04 #1370
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 master 2020-07-04 #1370
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
- update the diagnostic error message - add educational notes
Make the `round-trip-syntax-test` tool Python 3 friendly by tweaking the open modes and using `reduce` from `functools` as it has been removed in Python 3.
Adjust the regex match to do a better job of sanitizing the paths. This improves the test coverage pass rate with Python 3. Furthermore, handle the unicode conversion properly that breaks with Python 3. This further improves the Python 3 test coverage pass rate.
Try harder to appease the python linter
See swiftlang#30391, swiftlang#30296. Neither IRGen/conditional_conformances.swift nor IRGen/class_resilience.swift pass on OpenBSD unless target_mandates_stable_abi = TRUE.
…debase" Removes usage of #canImport(Darwin) from stdlib/public. This reverts a subset of commit cddf73e.
…get-all-nested-types AST: Remove unused ArchetypeType::getAllNestedTypes() method
This improves incremental rebuild performance.
Darwin 55 is now translated to macOS 46 after the LLVM changes landed that added support for macOS 11. This change temporarily disables the RUN line in the test that uses the `darwin55` triple until the appropriate fix is upstreamed on the swift side.
…-the-corona-away PathSanitizingFileCheck: improve Python3 compatibility
…m-interface action The situations where we use this action, e.g. explicit module building and generating prebuilt module cache, don't need synchronization. We should avoid using lock files for them. rdar://65005528
…ft-run-line Disable a RUN line in osx-targets.swift
Front-end: disable interface file locking for the -compile-module-from-interface action
test: make `round-trip-syntax-test` Python 3 friendly
This allows the lit configuration to be python 2 and 3 compatible.
…-protocol-diagnostic [Diagnostics] Fix Confusing Protocol Diagnostic
* SR-12486: `T.self is Any.Protocol` is broken This turned out to be fallout from swiftlang#27572 which was in turn motivated by our confusing metatype syntax when generic variables are bound to protocols. In particular, the earlier PR was an attempt to make the expression `x is T.Type` (where `T` is a generic type variable bound to a protocol `P`) behave the same as `x is P.Type` (where `P` is a protocol). Unfortunately, the generic `T.Type` actually binds to `P.Protocol` in this case (not `P.Type`), so the original motivation was flawed, and as it happens, `x is T.Type` already behaved the same as `x is P.Protocol` in this situation. This PR reverts that earlier change and beefs up some of the tests around these behaviors. Resolves SR-12486 Resolves rdar://62201613 Reverts PR#27572
Previously we would only gather one-way constraints if they were found through a type variable in their right hand side. However we would incorrectly check this against the type variable that we started the search at. This meant that if the constraint was found through a fixed binding, we would never return it, and could therefore fail to re-activate it, leaving it unsolved. Fix this issue by simply removing the check for the RHS, and letting the constraint system handle it instead. Resolves rdar://64890308.
Adds a basic test that the synthesized C++ constructor was generated correctly.
test: `iteritems` -> `items`
…ity-test Fix symbol visibility test for CentOS 7
test: repair the Windows builders after swiftlang#32666
… be statically known (swiftlang#32592) * [TypeCheckConstraints] Adjusting cases where checked casts that cannot be determined statically were producing misleading warnings * [tests] Adding regression tests for SR-13088 * [TypeCheckConstraints] Adjusting comment and adding an extra test case for SR13035 * [TypeCheckConstraints] Fixing typos in comments * [AST] Moving implementation of isCollection from ConstraintSystem to AST TypeBase * [TypeCheckConstraints] Adjusting logic to verify specific conformance to stdlib collection type before emit an downcast warning * [TypeCheckConstraints] Creating new CheckedCastContextKind::CollectionElement to be able to verify special cases within typeCheckCheckedCast for collection elements * [TypeCheckConstraints] Adjusting logic around generic substitution to check both subtype and supertype * [Sema] Adding isKnownStdlibCollectionType and replacing all usages contraint system method * [TypeChecker] Reverting fixes around array element types * [TypeChecker] Abstract logic of check for conditional requirements on TypeChecker::couldDynamicallyConformToProtocol * [TypeChecker] Ajdustinc can conformDynamically conform and adjust review comments * [TypeChecker] Ajusting comments and fixing typos * [TypeChecker] Adjusting existential and archetype logic to check inside couldDynamicConform * [TypeChecker] Adjusting minor and adding existential check into couldDynamically conform. * [TypeChecker] Adjusting comments
[CS] Avoid checking RHS of one-way constraint for reactivation
[EduNotes] Explain some opaque type diagnostics
…ableAPI [test] Add OpenBSD to stable ABI testing targets.
This adds support to `ClangImporter` to import C++ member function operators as static methods into Swift, which is part of SR-12748. The left-hand-side operand, which gets passed as the `this` pointer to the C++ function is represented as an additional first parameter in the Swift method. It gets mapped back in SILGen. Two of the tests are disabled on Windows because we can't yet call member functions correctly on Windows (SR-13129).
[SIL] NFC: Move #include of CanTypeVisitor.h
[SIL] NFC: Add more paranoia checks to SILType
Array literals only need to be finalized, if the array is really allocated. In case of zero elements, no allocation is done, but the empty-array singleton is used. "Finalization" means to emit an end_cow_mutation instruction on the array. As the empty-array singleton is a read-only and shared object, it's not legal to do a end_cow_mutation on it.
…builds. This was blocked by an LLDB problem, which is now fixed (swiftlang/llvm-project#1333)
…eralKeyPath)" This reinstates commit d7d829c with a fix for C tail-allocated arrays. Replace a call of the getter of AnyKeyPath._storedInlineOffset with a "constant" offset, in case of a keypath literal. "Constant" offset means a series of struct_element_addr and tuple_element_addr instructions with a 0-pointer as base address. These instructions can then be lowered to "real" constants in IRGen for concrete types, or to metatype offset lookups for generic or resilient types. Replace: %kp = keypath ... %offset = apply %_storedInlineOffset_method(%kp) with: %zero = integer_literal $Builtin.Word, 0 %null_ptr = unchecked_trivial_bit_cast %zero to $Builtin.RawPointer %null_addr = pointer_to_address %null_ptr %projected_addr = struct_element_addr %null_addr ... // other address projections %offset_ptr = address_to_pointer %projected_addr %offset_builtin_int = unchecked_trivial_bit_cast %offset_ptr %offset_int = struct $Int (%offset_builtin_int) %offset = enum $Optional<Int>, #Optional.some!enumelt, %offset_int rdar://problem/53309403
…checks stdlib: enable runtime checking for COW support by default in assert builds.
Reinstate "SILCombine: Constant-fold MemoryLayout<T>.offset(of: \.literalKeyPath)"
…Derivatives.swift.gyb
…r and _swift_isImmutableCOWBuffer to sync calling convention
MaxDesiatov
approved these changes
Jul 4, 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.
d365616 : Add WASI OS condition for stdlib/public/Differentiation/TgmathDerivatives.swift.gyb
b445780 : swiftlang@bc27356 revealed that
_swift_setImmutableCOWBuffer
and_swift_isImmutableCOWBuffer
are defined as C calling convention but called as swiftcc. So added swiftcc annotation to them. This change is related to Add swiftcc attribute for runtime functions called from Swift swiftlang/swift#30938