Skip to content

[NFC] Light refactoring of ParamDecl #10767

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 3 commits into from
Jul 5, 2017
Merged

Conversation

CodaFi
Copy link
Contributor

@CodaFi CodaFi commented Jul 5, 2017

The calm before the storm.

This patch involves 3 simple transformations:

  • Now that we have a richer representation of parameter specifiers, code synthesis can run through the same argument creation path without fear of boolean blindness.

  • Specifier::None is renamed to Specifier::Owned in anticipation of staging

  • setLet is replaced by the more general setSpecifier

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 5, 2017

@swift-ci please smoke test and merge

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 5, 2017

Whoops, forgot some missing InOutType::gets after the cherry pick.

@swift-ci please smoke test and merge

@jrose-apple
Copy link
Contributor

Specifier::None is renamed to Specifier::Owned in anticipation of staging

Are specifiers syntactic or semantic? If they're semantic, differentiating between Let and Owned doesn't seem useful.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 5, 2017

In this specific case it's syntactic. When owned becomes a specifier for var decls then we can collapse the two.

@swift-ci swift-ci merged commit 834a7d5 into swiftlang:master Jul 5, 2017
@CodaFi CodaFi deleted the crushing-let branch July 5, 2017 22:24
@jrose-apple
Copy link
Contributor

Are we expecting owned to become a specifier for var decls?

@jrose-apple
Copy link
Contributor

We also often do find it useful to track how the user wrote something. I'm not convinced that it's a good idea to make this change.

@CodaFi
Copy link
Contributor Author

CodaFi commented Jul 6, 2017

The ownership manifesto wants it, but I'm treating it as out of scope as it relates to the work I'm doing.

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