Skip to content

[master-rebranch] Merge in master resolving conflicts #33717

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

Conversation

nathawes
Copy link
Contributor

No description provided.

varungandhi-apple and others added 30 commits August 26, 2020 14:59
This translation is a pre-requisite to storing Clang types in SILFunctionType.
This assert doesn't consider reference storage types in its predicate.
Look through them since they're not relevant to the type consistency
check it's trying to pick out.
We could've stored a function pointer or a block pointer or a function reference.
…ants.

Invariants should be checked only when calling build(), not when the builder
itself is created.
At all call-sites, the extInfo passed as the third argument is computed directly
from the second argument, so we compute it directly in getBridgedFunctionType.
Try to impose a simple structure that splits performing actions from the
pre and post-pipeline conditions. Wherever actions would take more than
a simple return, split them into functions. Refine functions that
perform effects to return status codes when they fail. Finally,
delineate functions that need semantic analysis from those that do not.

Overall this should be NFC.
This operation is not actually dependent on the version.
…async

When a given Objective-C method has a completion handler parameter
with an appropriate signature, import that Objective-C method as
async. For example, consider the following CloudKit API:

    - (void)fetchShareParticipantWithUserRecordID:(CKRecordID
*)userRecordID
            completionHandler:(void (^)(CKShareParticipant * _Nullable shareParticipant, NSError * _Nullable error))completionHandler;

With the experimental concurrency model, this would import as:

    func fetchShareParticipant(withUserRecordID userRecordID: CKRecord.ID) async throws -> CKShare.Participant?

The compiler will be responsible for turning the caller's continuation
into a block to pass along to the completion handler. When the error
parameter of the completion handler is non-null, the async call
will result in that error being thrown. Otherwise, the other arguments
passed to that completion handler will be returned as the result of
the async call.

async versions of methods are imported alongside their
completion-handler versions, to maintain source compatibility with
existing code that provides a completion handler.

Note that this only covers the Clang importer portion of this task.
…n for splitting into multiple small pseudo-passes.

SemanticARCOpts keeps on growing with various optimizations attached to a single
"optimization" manager. Move it to its own folder in prepation for splitting it
into multiple different optimizations and utility files.
…ync import

Extend the check for completion handler parameters to also consider the
name of the parameter (not its argument label). If it's `completion` or
`completionHandler`, we have a completion handler. This extends our
API coverage for importing Objective-C methods with completion
handlers as 'async'.
…pes-in-sil-setup

Setup code for Clang types in SIL.
…orting

Add error reporting when looking up types by demangled name.
…ctor expressions that contain code completions.
…ompletion exprs and type check them for code completion.

Fixes up some tests marked as non-ideal to give the ideal result now too.
…ayed parsing as well

We were previously only doing it when parsing up front.
CodaFi and others added 25 commits August 29, 2020 09:40
On-Bot Debugging Of Test Failure
…' derived conformances. (swiftlang#33700)

In `Differentiable` derived conformances, `let` properties are currently treated as if they had `@noDerivative` and excluded from the derived `Differentiable` conformance implementation. This is limiting to properties that have a non-mutating `move(along:)` (e.g. class properties), which can be mathematically treated as differentiable variables.

This patch changes the derived conformances behavior such that `let` properties will be included as differentiable variables if they have a non-mutating `move(along:)`. This unblocks the following code:

```swift
final class Foo: Differentiable {
   let x: ClassStuff // Class type with a non-mutating 'move(along:)'

   // Synthesized code:
   //   struct TangentVector {
   //     var x: ClassStuff.TangentVector
   //   }
   //   ...
   //   func move(along direction: TangentVector) {
   //     x.move(along: direction.x)
   //   }
}
```

Resolves SR-13474 (rdar://67982207).
…onstrained extension

The mangling includes all generic parameters, even non-canonical ones.

Fixes <rdar://problem/67949286>.
…emanticARCOpts.h into its own header.

This is so I can move individual sub-optimizations on SemanticARCOptVisitor into
their own files. So for instance, there will be one file containing the load
[copy] optimization and another containing the phi optimization, etc.
…ecl-in-constrained-extension

ASTDemangler: Fix reconstruction of opaque result type defined in a constrained extension
Now that all sites have been refactored to pass a dedicated OpenUnboundGenericType callable,
we can consistently move the construction of the opener into resolveTypeReferenceInExpression
and have it take a ConstraintLocatorBuilder parameter instead
…60f0740c27ccd9aabe849bd

[ownership] Extract out the main visitor SemanticARCOptVisitor from SemanticARCOpts.h into its own header.
…lder

CSGen: Infer generic arguments in typed placeholders
[NFC] Correcting minor typo on a CSDiagnostics comment
[IDE] Fix typo to address unused warning (NFC)
@nathawes
Copy link
Contributor Author

@swift-ci please smoke test

@nathawes
Copy link
Contributor Author

Please test with the following PR:
swiftlang/llvm-project#1720

@swift-ci please smoke test

@shahmishal shahmishal merged commit 4705ec9 into swiftlang:master-rebranch Sep 1, 2020
@nathawes nathawes deleted the merge-master-to-master-rebranch-2020-08-31 branch September 1, 2020 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.