summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-02-09 18:41:16 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-02-09 22:08:03 +0100
commit6f05acaa43d8aa036e26f68937e71dbae60bb5b4 (patch)
treeec4a977fd12b6b2365e2d8e6bdd6d5bcdcd56ab3 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent08e51dfec50842253afb87cc5ae3c7400dc18ced (diff)
downloadscala-6f05acaa43d8aa036e26f68937e71dbae60bb5b4.tar.gz
scala-6f05acaa43d8aa036e26f68937e71dbae60bb5b4.tar.bz2
scala-6f05acaa43d8aa036e26f68937e71dbae60bb5b4.zip
Optimization: use AnyRef map for Namer -> Typer tree handoff
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`.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 645f267a21..2f2ecb90fa 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -1413,7 +1413,7 @@ trait Namers extends MethodSynthesis {
val newImport = treeCopy.Import(imp, expr1, selectors).asInstanceOf[Import]
checkSelectors(newImport)
- transformed(imp) = newImport
+ context.unit.transformed(imp) = newImport
// copy symbol and type attributes back into old expression
// so that the structure builder will find it.
expr setSymbol expr1.symbol setType expr1.tpe