Skip to content

Transform/private to static #207

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 8 commits into from
Nov 9, 2014

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 30, 2014

New miniphase. Builds on #203.

I wanted to merge with previous but need some functionality in TreeTransforms to do it.

Review by @DarkDimius

import ast.Trees._
import TreeTransforms.TransformerInfo

/** The preceding lambda lift and flatten phases move symbols to different scopes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment doesn't match the phase

@DarkDimius
Copy link
Contributor

Otherwise LGTM.

Some changes needed so that Flatten can run after LambdaLift
To be combinable with follow-up mini-phases the lift operation needs to handle Thickets specially.
This commit factors out the behavior from LambdaLift, so that Flatten can do the same thing.
Cleans up after LambdaLift and Flatten. RestoreScopes exhibited a problem (double definition)
when compiling Unpickler. The root of the problem was in Applications.scala. The effect was
that arguments woulkd be lifted out, but then the argument expression would be used anyway. That caused
a closure to be present twice which caused the double def error much later. -Ycheck did not catch it because
the two closure expressions were in non-overlapping scopes.
Threw away list of constructed statements.
Make private methods in traits static, so that we do not need
to give a default for them.
@odersky odersky force-pushed the transform/privateToStatic branch from f73772b to 74ec188 Compare November 9, 2014 17:48
@odersky
Copy link
Contributor Author

odersky commented Nov 9, 2014

Force pushed after rebase to current master.

odersky added a commit that referenced this pull request Nov 9, 2014
@odersky odersky merged commit 4180bc3 into scala:master Nov 9, 2014
@odersky odersky deleted the transform/privateToStatic branch November 13, 2014 10:07
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