Skip to content

Fix tree traversal in ElimByName #4429

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 1 commit into from
May 1, 2018
Merged

Conversation

allanrenucci
Copy link
Contributor

ElimByName prevented some trees to be traversed by the following phases
in the group.

@allanrenucci
Copy link
Contributor Author

allanrenucci commented May 1, 2018

test performance with #fast please

@dottybot
Copy link
Member

dottybot commented May 1, 2018

performance test scheduled: 2 job(s) in queue, 1 running.

@@ -50,7 +50,11 @@ class ElimByName extends TransformByNameApply with InfoTransformer {
/** Map `tree` to `tree.apply()` is `ftree` was of ExprType and becomes now a function */
private def applyIfFunction(tree: Tree, ftree: Tree)(implicit ctx: Context) =
if (isByNameRef(ftree))
ctx.atPhase(next) { implicit ctx => tree.select(defn.Function0_apply).appliedToNone }
ctx.atPhase(next) { implicit ctx =>
transformFollowing(tree)
Copy link
Member

Choose a reason for hiding this comment

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

The transformFollowing should be outside of the ctx.atPhase.

ElimByName prevented some trees to be traversed by the following phases
in the group.
@dottybot
Copy link
Member

dottybot commented May 1, 2018

performance test scheduled: 1 job(s) in queue, 1 running.

@dottybot
Copy link
Member

dottybot commented May 1, 2018

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/4429/ to see the changes.

Benchmarks is based on merging with master (f54e7aa)

@allanrenucci allanrenucci merged commit 3026574 into scala:master May 1, 2018
@allanrenucci allanrenucci deleted the byname branch May 1, 2018 18:14
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