forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Resolve conflicts with upstream main
#2463
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
…endency-scanning queries.
… scanning tool C++ library
…rInstance into callers of scanDependencies It is now the responsibility of the scanDependencies code to instantiate (and share) the cache. e.g. FrontendTool instantiates a new cache per `-scan-dependencies` invocation, and the DependencyScanningTool keeps one shared cache across its lifetime.
Since it was introduced, its use-case has been entirely subsumed by batch scanning.
…ory format as a result This commit refactors ScanDependencies.cpp to split the functionality into two functional groups: - Scan execution code that performs the mechanics of the scan and produces an in-memory result - Dependency scanner entry-points used when the scanning action is invoked as a `swift-frontend` execution mode This commit also adds the aforementioned in-memory dependency scanning result in `FullDependencies.h`, modeled after the InterModuleDependencyGraph representation in swift-driver
… scanning actions, and scan results. Adds a C API layer consisting of: - Data structures used to represent in-memory result of dependency scanning - Opaque dependency scanner tool (C wrapper for `DependencyScanningTool`) Refactors `ScanDependencies.cpp` to produce dependency scanning result in the form of the above binary format.
…he corresponding C API for an import prescan operation
…s with API query functions for individual fields
…he corresponding C API for a batch scan operation
…nd adopt query method naming scheme of: `<prefix>_<object>_<action>`
…module dependency graph) an opaque structure
… set) an opaque structure
…rking_dir) an opaque type
…stead of `void*` for better type-safety and cleaner code
…and a creation method to return an isntance of the opaque invocation
…ols` and add exports file. This library now relires on a static compiler library called `swiftDependencyScan`, which is also common to being used by `swift-frontend` for its dependency scanner invocations.
… and tie lifetime to owning object.
…lect C API changes.
…a Foundation-style ownership signals naming scheme across the API surface. Foundation-style ownership signals documentation: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-CJBEJBHH
…stead of defining own wrap/unwrap functions for the opaque scanner type.
… if it is `empty`
…ay struct type fields to be consistent.
On Linux with -O: [ RUN ] Set.formSymmetricDifference stdout>>> check failed at /Users/docker_user/src/build/buildbot_linux/swift-linux-x86_64/main.swift, line 3245 stdout>>> unexpected value: "94788628116752" (of type Swift.Int) [ FAIL ] Set.formSymmetricDifference The test is roughly: var s1 = Set(...) let s1_copy = s1 let identity1 = s1._rawIdentifier() s1.someMutatingMethod1() check(s1) check(s1_copy) s1.someMutatingMethod2() // Mutating the set should cause an identity change releaseAssert(identity1 != s1._rawIdentifier()) On Linux, the optimizer is able to destroy s1_copy before the call to s1.someMutatingMethod2(), which generates new Set storage. This new storage uses the same address as the destroyed s1_copy. Fixes rdar://72933150 ([CanonicalOSSA] Fix Set.swift unit test that assumes object lifetime)
On Linux with -O: Could not cast value of type 'Swift.Optional<Swift.AnyObject>' (0x7fa5f4285b60) to 'weaktest.NativeSwiftClass' (0x563acd3f30d8). weak var verifier: AnyObject? do { let parent = NativeSwiftClassHasWeak(x: 1010) let child = NativeSwiftClass(x: 2020) verifier = child parent.weakProperty = child let mirror = Mirror(reflecting: parent) let children = Array(mirror.children) let extractedChild = children[0].1 as! NativeSwiftClass expectNotNil(extractedChild) expectNotNil(verifier) } expectNil(verifier) Here the expression children[-1].1 is a weak reference refering back to 'child'. There's nothing keeping that 'child' object alive. On Linux, the optimizer is able to destroy child before the dynamic type cast. The cast attempts to cast a nil weak reference and fails. Fixes rdar://72933297 ([CanonicalOSSA] Fix WeakMirror.swift test that assumes object lifetime)
Additional handling of copy_value/destroy_value/load[copy]/ begin_borrow/end_borrow is needed to support OSSA. TODO: Support handling of 2d array in the pass for OSSA. Currently hoisting of loads and borrows are not supported in OSSA
ClangImporter: synchronize clang and Swift
This fixes a regression from some over-eager logic introduced by my commit 5d6cf5c. We need to be careful to preserve this flag only in cases where the throwing-ness bubbles up from the nested ContextScope, namely AwaitExpr and InterpolatedStringLiteralExpr. Fixes <rdar://problem/72748150>.
Dependency Scanning Library
[Sema] Fix storage of availability macros definition for SourceKit
Enable COWArrayOpts on OSSA
Add a _fixLifetime call to stdlib/WeakMirror.swift test.
Frontend: Don't record request references in WMO builds
[test] Disable tests for newly introduced Range behavior on earlier OSes
Like pullbacks, differentials should have private linkage, not hidden linkage. This patch fixes that.
…ssing-throws-fix Sema: Fix preservation of DiagnoseErrorOnTry flag
Add a _fixLifetime to stdlib/Set.swift test.
The code in #selector doesn't execute, so don't perform actor-isolation checking in there. It also happens to have subexpressions that don't really follow the rules for references to instance methods, so avoiding this checking eliminates both compiler crashes and been spurious errors. Fixes rdar://72945343.
Sema: Tweak a diagnostic
Otherwise, this uniqueness check will unexpectedly succeed when tests run in optimize mode and 'c' is destroyed early: let c = C() var b = B(native: c, isFlagged: flag) //... expectFalse(b.isUniquelyReferencedUnflaggedNative()) // Keep 'c' alive for the isUniquelyReferenced check above. _fixLifetime(c) Fixes rdar://72957398 ([CanonicalOSSA] Add a _fixLifetime to stdlib/BridgeStorage.swift test.)
…lector [Concurrency] Don't perform actor isolation checking within #selector.
[AutoDiff] Differentials should have private linkage
…-var Clarify SWIFT_USE_SCCACHE meaning
fix minor typo in command in benchmarks/readme
# Conflicts: # tools/CMakeLists.txt
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.