Skip to content

AST cleanup: simplify initialization contexts #4603

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 4 commits into from
Sep 2, 2016

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Sep 2, 2016

Simplify various parts of the AST's handling of initialization contexts. Should be NFC.

Addresses rdar://problem/28142028.

…-local scopes.

We were optimizing away unused pattern binding initializer contexts in
both the parser and in semantic analysis, which led to a
somewhat-unpredictable set of DeclContexts in the AST. Normalize
everything by always creating these contexts.
ExprHandle is a relic from a horrible time when expressions made their
way into the type system via default arguments. It's been unnecessary
for a long time, so get rid of it.
…ault argument.

As with pattern binding initializer contexts, we were trying to
optimize away these contexts, leading to an unpredictable AST.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit 1a4328b into swiftlang:master Sep 2, 2016
@DougGregor DougGregor deleted the simplify-init-contexts branch September 2, 2016 21:41
@lattner
Copy link
Contributor

lattner commented Sep 3, 2016

Yay! ExprHandle is dead!

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