scala/scala — pull request #3494 by retronym (2014-02-09 17:52:14+00:00)
Title: Optimization: use AnyRef map for Namer -> Typer tree handoff

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.