Skip to content
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

Optimization: use AnyRef map for Namer -> Typer tree handoff #3494

Merged
merged 2 commits into from Feb 10, 2014

Conversation

retronym
Copy link
Member

@retronym retronym commented Feb 9, 2014

And uses a map per-compilation unit, rather than one per Typer.

No need to cleanup in reset(), this way.

Review by @gkossakowski

In my topic/opt2 branch, I used tree attachments as an alternative
to using a map at all. But when I submitted a PR with that change,
the test suite picked up a subtle change in behaviour that I didn't
have time to investigate. Switching to AnyRefMap is a lower-risk
patch, but still worthwhile for performance.

And uses a map per-compilation unit, rather than one per Typer.

One small change required: we now need to clear this map in the
the interactive compiler which reuses compilation units, rather
than in the call to `Typer#reset`.
These are a hotspot in the backend.
gkossakowski added a commit that referenced this pull request Feb 10, 2014
Optimization: use AnyRef map for Namer -> Typer tree handoff
@gkossakowski gkossakowski merged commit 16ed9f4 into scala:master Feb 10, 2014
@gkossakowski
Copy link
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants