Skip to content

SILGen: Base "currying" of functions on their lowered capture set, instead of their formal capture set. #5574

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

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Nov 1, 2016

This allows for slightly better codegen for nested functions that refer to other nested functions that don't transitively capture any local state, but more importantly, allows methods of local types to work while still referring to nested functions that don't capture local state, fixing rdar://problem/28015090.

@jckarter
Copy link
Contributor Author

jckarter commented Nov 1, 2016

@swift-ci Please smoke test

@jckarter
Copy link
Contributor Author

jckarter commented Nov 1, 2016

@slavapestov Does this look reasonable for 3.0?

@jckarter
Copy link
Contributor Author

jckarter commented Nov 1, 2016

Test failure looks like a test case that needs to be updated. I'll fix it.

…stead of their formal capture set.

This allows for slightly better codegen for nested functions that refer to other nested functions that don't transitively capture any local state, but more importantly, allows methods of local types to work while still referring to nested functions that don't capture local state, fixing rdar://problem/28015090.
@jckarter jckarter force-pushed the nested-function-lowered-captures branch from 8af2bb3 to f81e55c Compare November 1, 2016 18:10
@jckarter
Copy link
Contributor Author

jckarter commented Nov 1, 2016

@swift-ci Please smoke test

@jckarter jckarter merged commit a66ab83 into swiftlang:master Nov 1, 2016
@slavapestov
Copy link
Contributor

Looks good, thanks for taking this one.

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.

2 participants