summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Macros.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-14 17:11:03 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-15 00:55:56 +0200
commite6176afdcdb7abffdee8a6f8d5e58790f8f905fc (patch)
tree21edbf1f54f3357c46a58edf72e61e3cff3ed110 /src/compiler/scala/tools/nsc/typechecker/Macros.scala
parentba3a9e05a6276fec976f4e53923e70b58b9f647b (diff)
downloadscala-e6176afdcdb7abffdee8a6f8d5e58790f8f905fc.tar.gz
scala-e6176afdcdb7abffdee8a6f8d5e58790f8f905fc.tar.bz2
scala-e6176afdcdb7abffdee8a6f8d5e58790f8f905fc.zip
SI-6362 & SI-5924 removes caches in the macro API
As recent experience shows, it's hardly possible to provide a global cache that persists between compilation runs: http://groups.google.com/group/scala-ide-user/browse_thread/thread/b1cab5588ff21f7f. Therefore I think we need to remove Context.globalCache. Speaking of a per-run cache, it looks like Context.cache can be to a certain extent emulated with attachments. Otherwise, one could write a JVM-wide static cache weakly indexed by compilation run instances (that are available via c.currentRun). For now I think we need to remove both caches. If macro writers really need that functionality, we could come up with a well-thought API later.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Macros.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Macros.scala3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Macros.scala b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
index 7796c0bf1b..d3580c19ef 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Macros.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Macros.scala
@@ -49,9 +49,6 @@ trait Macros extends scala.tools.reflect.FastTrack with Traces {
import MacrosStats._
def globalSettings = global.settings
- val globalMacroCache = collection.mutable.Map[Any, Any]()
- val perRunMacroCache = perRunCaches.newMap[Symbol, collection.mutable.Map[Any, Any]]
-
/** `MacroImplBinding` and its companion module are responsible for
* serialization/deserialization of macro def -> impl bindings.
*