Skip to content

Partial apply arguments pluszero #14547

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 2 commits into from
Feb 12, 2018

Conversation

gottesmm
Copy link
Contributor

This PR does two two different things in two commits:

  1. getNextUncurryLevelRef and emitCurryThunk are converted to traffic in ManagedValues.
  2. Now that we are working with ManagedValues, I can fix an issue that comes up a few times when I run the normal test suite with ownership enabled. Basically, we weren't copying a guaranteed value before we passed it off at +1 to a partial apply. So the fix is a simple convention independent ManagedValue::ensurePlusOne(...).

rdar://34222540

…traffic in ManagedValues instead of SILValues.

This is a refactor that we want in general and allows me to use
ensurePlusOne(...) to ensure we retain all values we put into the partial
apply.

rdar://34222540
…ly arguments are always at +1.

This enables curry thunks to handle properly +0 arguments that are captured by a
partial apply.

I am pretty sure that this can not happen without +0. It occurs relatively
frequently in the SILGen tests when you run with ownership enabled.

rdar://34222540
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 452b8bd into swiftlang:master Feb 12, 2018
@gottesmm gottesmm deleted the partial_apply_arguments_pluszero branch February 12, 2018 06:33
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