Skip to content

[globalopt] Cleanup placeInitializers. #15495

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

gottesmm
Copy link
Contributor

This whole function is just really hard for me to read. I did two things to ease that:

  1. I extracted a helper function called getHoistedApplyForInitializer. When I extracted the helper function, I also inverted a conditional to make the control flow easier to read and eliminate a level of indentation.
  2. I inverted a condition to clarify control flow and allow for an early-exit + indentation level reduction.

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test and merge

@gottesmm
Copy link
Contributor Author

Linux failure is in SourceKit.

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test linux platform

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test linux platform

@gottesmm gottesmm merged commit efca1ca into swiftlang:master Mar 24, 2018
@gottesmm gottesmm deleted the pr-f8d1bdd4feca6f9af1dd5746b016d839eb34bce1 branch March 24, 2018 23:48
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.

1 participant