diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-02 02:11:34 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-07-02 02:11:34 -0700 |
commit | a82a6ab54ac2eb714ad99a9f411c326bbf2a22a7 (patch) | |
tree | b500a72b6f9babe2245f8c4f5d0c23dc76662789 /src | |
parent | 0a9cea6ea58571deb67d60193d60d12be6bb0233 (diff) | |
parent | 105d3efcc723cb7312a25a898a7769c7f762b57e (diff) | |
download | scala-a82a6ab54ac2eb714ad99a9f411c326bbf2a22a7.tar.gz scala-a82a6ab54ac2eb714ad99a9f411c326bbf2a22a7.tar.bz2 scala-a82a6ab54ac2eb714ad99a9f411c326bbf2a22a7.zip |
Merge pull request #804 from scalamacros/topic/reflectglobal
moves reflective compiler into scala.tools.reflect
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/reflect/ReflectGlobal.scala (renamed from src/compiler/scala/tools/nsc/ReflectGlobal.scala) | 9 | ||||
-rw-r--r-- | src/compiler/scala/tools/reflect/ReflectMain.scala (renamed from src/compiler/scala/tools/nsc/ReflectMain.scala) | 12 | ||||
-rw-r--r-- | src/compiler/scala/tools/reflect/ReflectSetup.scala (renamed from src/compiler/scala/tools/nsc/ReflectSetup.scala) | 7 | ||||
-rw-r--r-- | src/compiler/scala/tools/reflect/ToolBoxFactory.scala | 1 | ||||
-rw-r--r-- | src/reflect/scala/reflect/runtime/SymbolTable.scala | 2 |
5 files changed, 20 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/ReflectGlobal.scala b/src/compiler/scala/tools/reflect/ReflectGlobal.scala index 4f4db83339..f8ded56ec6 100644 --- a/src/compiler/scala/tools/nsc/ReflectGlobal.scala +++ b/src/compiler/scala/tools/reflect/ReflectGlobal.scala @@ -1,12 +1,15 @@ -package scala.tools.nsc +package scala.tools +package reflect -import reporters.Reporter +import scala.tools.nsc.Global +import scala.tools.nsc.reporters.Reporter +import scala.tools.nsc.Settings /** A version of Global that uses reflection to get class * infos, instead of reading class or source files. */ class ReflectGlobal(currentSettings: Settings, reporter: Reporter, override val rootClassLoader: ClassLoader) - extends Global(currentSettings, reporter) with scala.tools.nsc.ReflectSetup with scala.reflect.runtime.SymbolTable { + extends Global(currentSettings, reporter) with scala.tools.reflect.ReflectSetup with scala.reflect.runtime.SymbolTable { override def transformedType(sym: Symbol) = erasure.transformInfo(sym, diff --git a/src/compiler/scala/tools/nsc/ReflectMain.scala b/src/compiler/scala/tools/reflect/ReflectMain.scala index 161391fc2c..116ae24cdd 100644 --- a/src/compiler/scala/tools/nsc/ReflectMain.scala +++ b/src/compiler/scala/tools/reflect/ReflectMain.scala @@ -1,8 +1,12 @@ -package scala.tools.nsc +package scala.tools +package reflect -import tools.util.PathResolver -import util.ClassPath.DefaultJavaContext -import util.ScalaClassLoader +import scala.tools.nsc.Driver +import scala.tools.nsc.Global +import scala.tools.nsc.Settings +import scala.tools.nsc.util.ClassPath.DefaultJavaContext +import scala.tools.nsc.util.ScalaClassLoader +import scala.tools.util.PathResolver object ReflectMain extends Driver { diff --git a/src/compiler/scala/tools/nsc/ReflectSetup.scala b/src/compiler/scala/tools/reflect/ReflectSetup.scala index 26c720a10f..f18c114d62 100644 --- a/src/compiler/scala/tools/nsc/ReflectSetup.scala +++ b/src/compiler/scala/tools/reflect/ReflectSetup.scala @@ -1,7 +1,10 @@ -package scala.tools.nsc +package scala.tools +package reflect + +import scala.tools.nsc.Global /** A helper trait to initialize things that need to be set before JavaMirrors and other * reflect specific traits are initialized */ -private[nsc] trait ReflectSetup { this: Global => +private[reflect] trait ReflectSetup { this: Global => phase = new Run().typerPhase }
\ No newline at end of file diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala index 278f4e3ff7..b4178102b9 100644 --- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala +++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala @@ -2,7 +2,6 @@ package scala.tools package reflect import scala.tools.nsc.reporters._ -import scala.tools.nsc.ReflectGlobal import scala.tools.nsc.CompilerCommand import scala.tools.nsc.Global import scala.tools.nsc.typechecker.Modes diff --git a/src/reflect/scala/reflect/runtime/SymbolTable.scala b/src/reflect/scala/reflect/runtime/SymbolTable.scala index c90665508b..5b9090dae5 100644 --- a/src/reflect/scala/reflect/runtime/SymbolTable.scala +++ b/src/reflect/scala/reflect/runtime/SymbolTable.scala @@ -4,7 +4,7 @@ package runtime /** * This symbol table trait fills in the definitions so that class information is obtained by refection. * It can be used either from a reflexive universe (class scala.reflect.runtime.JavaUniverse), or else from - * a runtime compiler that uses reflection to get a class information (class scala.tools.nsc.ReflectGlobal) + * a runtime compiler that uses reflection to get a class information (class scala.tools.reflect.ReflectGlobal) */ trait SymbolTable extends internal.SymbolTable with JavaMirrors with SymbolLoaders with SynchronizedOps { |