Skip to content

Conversation

@marcrasi
Copy link

@marcrasi marcrasi commented Nov 8, 2019

Adds the AST bits necessary to represent @differentiable AnyFunctionType and SILFunctionType. Plumbs these bits through parsing and printing so that they can be tested. Adds serialization for them.

This resolves TF-871.

Intentionally omits any functionality based on these bits to keep this PR small. (e.g. typechecking that the @differentiable attr is allowed on the types; lowering @differentiable AnyFunctionType to the corresponding @differentiable SILFunctionType)

Copy link
Contributor

@lattner lattner left a comment

Choose a reason for hiding this comment

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

LG thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

nit, but it seems like != would be more natural here than >

Copy link
Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a mangling for these flags? If so, it seems like it should be plumbed in here for the demangler to use.

Copy link
Author

@marcrasi marcrasi Nov 11, 2019

Choose a reason for hiding this comment

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

We've got some mangling in the tensorflow branch. I will upstream it in a separate PR. There is a ticket for that: https://bugs.swift.org/browse/TF-948

@marcrasi marcrasi force-pushed the diff-fn-ty-ast-bits branch from fbbde63 to 1b8b0bc Compare November 11, 2019 19:16
@marcrasi
Copy link
Author

@swift-ci please test and merge

@marcrasi marcrasi force-pushed the diff-fn-ty-ast-bits branch from 1b8b0bc to 40524de Compare November 12, 2019 18:25
@marcrasi
Copy link
Author

@swift-ci please test and merge

1 similar comment
@marcrasi
Copy link
Author

@swift-ci please test and merge

@marcrasi marcrasi force-pushed the diff-fn-ty-ast-bits branch from 40524de to 6413f43 Compare November 12, 2019 23:19
@marcrasi
Copy link
Author

@swift-ci please test and merge

2 similar comments
@marcrasi
Copy link
Author

@swift-ci please test and merge

@marcrasi
Copy link
Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 39fb55b into swiftlang:master Nov 13, 2019
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.

3 participants