Skip to content

Remove cruft from TyperPhase #13771

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
Oct 27, 2021
Merged

Conversation

adampauls
Copy link
Contributor

During development of #13762, I noticed there was some defunct code in the TyperPhase. This PR (the first commit of the previous PR) cleans up that cruft.

@@ -89,11 +73,9 @@ class TyperPhase(addRootImports: Boolean = true) extends Phase {
else
newCtx

remaining = unitContexts
while remaining.nonEmpty do
Copy link
Member

@bishabosha bishabosha Oct 19, 2021

Choose a reason for hiding this comment

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

this while loop was probably added for a performance critical reason, I suggest remaining could be made a local variable (maybe premature optimisation?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’m pretty sure it was there to enable stillToBeEntered, which is no longer used (AFAICT).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Friendly ping @bishabosha? Is there anything I need to change here?

Copy link
Member

@bishabosha bishabosha Oct 27, 2021

Choose a reason for hiding this comment

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

Im running the benchmarks, I'm sure that it probably makes no difference if it is foreach or a loop

@bishabosha
Copy link
Member

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

Visit https://dotty-bench.epfl.ch/13771/ to see the changes.

Benchmarks is based on merging with master (968dd1b)

Copy link
Member

@bishabosha bishabosha left a comment

Choose a reason for hiding this comment

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

LGTM, the makeAnnotated function was written in 2016, seems it is not used for a while

@bishabosha bishabosha merged commit bd57121 into scala:master Oct 27, 2021
@adampauls
Copy link
Contributor Author

Thanks!

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