diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-07-02 00:37:59 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-07-02 00:53:04 +0200 |
commit | 105d3efcc723cb7312a25a898a7769c7f762b57e (patch) | |
tree | c36e1188cd883b1b9da10b36369c6ee2611cf7f9 | |
parent | cd1e6f94e92f2c8fc79aa3c76b1e3b813182e2d3 (diff) | |
download | scala-105d3efcc723cb7312a25a898a7769c7f762b57e.tar.gz scala-105d3efcc723cb7312a25a898a7769c7f762b57e.tar.bz2 scala-105d3efcc723cb7312a25a898a7769c7f762b57e.zip |
moves reflective compiler into scala.tools.reflect
-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 { |