Skip to content
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

[Autodiff] Derivative Registration for the Get and Set Accessors #32614

Merged
merged 19 commits into from
Jul 2, 2020

Conversation

ematejska
Copy link
Contributor

This implements the support for@derivative derivative registration for the get and set accessors (https://bugs.swift.org/browse/TF-1193.). The class set accessor is not yet supported.

Done together with @dan-zheng

@ematejska ematejska requested a review from dan-zheng June 30, 2020 04:10
@ematejska
Copy link
Contributor Author

@swift-ci please smoke test

@ematejska
Copy link
Contributor Author

@swift-ci please test

@dan-zheng dan-zheng requested a review from rxwei June 30, 2020 05:06
Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

utils/gyb_syntax_support/AttributeNodes.py Outdated Show resolved Hide resolved
lib/Parse/ParseDecl.cpp Show resolved Hide resolved
lib/Parse/ParseDecl.cpp Outdated Show resolved Hide resolved
lib/Parse/ParseDecl.cpp Outdated Show resolved Hide resolved
lib/Parse/ParseDecl.cpp Outdated Show resolved Hide resolved
lib/Sema/TypeCheckAttr.cpp Show resolved Hide resolved
Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When syntax definitions are changed, I believe apple/swift-syntax needs to be updated with newly generated syntax files. This is necessary to pass --swiftsyntax-verify-generated-files.

Here's an example PR. I think you can regenerate swift-syntax files locally with utils/build-script --infer --swiftsyntax.

lib/Sema/TypeCheckAttr.cpp Outdated Show resolved Hide resolved
@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ab5bd6b

ematejska and others added 4 commits June 30, 2020 08:22
@gottesmm
Copy link
Contributor

Before this lands, can you be sure to re-base and clean up the git history by smooshing commits that don't stand on their own. Thanks!

@ematejska
Copy link
Contributor Author

@swift-ci please smoke test

@ematejska
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2020

Build failed
Swift Test Linux Platform
Git Sha - ab5bd6b

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - ab5bd6b

Copy link
Contributor

@dan-zheng dan-zheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ematejska: would you like to preemptively squash commits? Or you could "Squash and merge" with a short commit description.

lib/Sema/TypeCheckAttr.cpp Outdated Show resolved Hide resolved
Co-authored-by: Dan Zheng <danielzheng@google.com>
@ematejska
Copy link
Contributor Author

@swift-ci please smoke test

@ematejska
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - e7ddf70

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2020

Build failed
Swift Test Linux Platform
Git Sha - e7ddf70

@ematejska
Copy link
Contributor Author

@swift-ci please test os x platform

@ematejska
Copy link
Contributor Author

@swift-ci please smoke test os x platform

@ematejska
Copy link
Contributor Author

Nice!

@ematejska: would you like to preemptively squash commits? Or you could "Squash and merge" with a short commit description.

I'll do the Squash and merge.

@ematejska
Copy link
Contributor Author

When syntax definitions are changed, I believe apple/swift-syntax needs to be updated with newly generated syntax files. This is necessary to pass --swiftsyntax-verify-generated-files.

Here's an example PR. I think you can regenerate swift-syntax files locally with utils/build-script --infer --swiftsyntax.

I'll try to do this today.

@swift-ci
Copy link
Contributor

swift-ci commented Jul 1, 2020

Build failed
Swift Test OS X Platform
Git Sha - 16a9b17

@ematejska
Copy link
Contributor Author

Please test with:
swiftlang/swift-syntax#225

@swift-ci please test os x platform

@akyrtzi akyrtzi merged commit fbec91a into master Jul 2, 2020
@akyrtzi akyrtzi deleted the autodiff-accessor-derivatives branch July 2, 2020 03:15
This pull request was closed.
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.

6 participants