summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/reflect/macros/runtime/Infrastructure.scala4
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Macros.scala3
-rw-r--r--src/reflect/scala/reflect/macros/Infrastructure.scala19
3 files changed, 0 insertions, 26 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/Infrastructure.scala b/src/compiler/scala/reflect/macros/runtime/Infrastructure.scala
index 77ac8c6581..a8cc61e0f9 100644
--- a/src/compiler/scala/reflect/macros/runtime/Infrastructure.scala
+++ b/src/compiler/scala/reflect/macros/runtime/Infrastructure.scala
@@ -33,8 +33,4 @@ trait Infrastructure {
}
val currentMacro: Symbol = expandee.symbol
-
- val globalCache: scala.collection.mutable.Map[Any, Any] = universe.analyzer.globalMacroCache
-
- val cache: scala.collection.mutable.Map[Any, Any] = universe.analyzer.perRunMacroCache.getOrElseUpdate(currentMacro, collection.mutable.Map[Any, Any]())
}
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.
*
diff --git a/src/reflect/scala/reflect/macros/Infrastructure.scala b/src/reflect/scala/reflect/macros/Infrastructure.scala
index c195692832..80153ff257 100644
--- a/src/reflect/scala/reflect/macros/Infrastructure.scala
+++ b/src/reflect/scala/reflect/macros/Infrastructure.scala
@@ -77,23 +77,4 @@ trait Infrastructure {
/** Returns a macro definition which triggered this macro expansion.
*/
val currentMacro: Symbol
-
- // todo. redo caches as discussed on Reflecting Meeting 2012/03/29
- // https://docs.google.com/document/d/1oUZGQpdt2qwioTlJcSt8ZFQwVLTvpxn8xa67P8OGVpU/edit
-
- /** A cache shared by all invocations of all macros across all compilation runs.
- *
- * Needs to be used with extreme care, since memory leaks here will swiftly crash the presentation compiler.
- * For example, Scala IDE typically launches a compiler run on every edit action so there might be hundreds of runs per minute.
- */
- val globalCache: scala.collection.mutable.Map[Any, Any]
-
- /** A cache shared by all invocations of the same macro within a single compilation run.
- *
- * This cache is cleared automatically after a compilation run is completed or abandoned.
- * It is also specific to a particular macro definition.
- *
- * To share data between different macros and/or different compilation runs, use ``globalCache''.
- */
- val cache: scala.collection.mutable.Map[Any, Any]
}