summaryrefslogtreecommitdiff
path: root/src/repl
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2013-07-25 12:11:44 -0700
committerJason Zaugg <jzaugg@gmail.com>2015-10-27 13:15:26 +1000
commit3deca7d95882303ed2f73b805df44c89649880f3 (patch)
treea547f33219a38853836c611084e5cbe412db34b2 /src/repl
parent462dc9af886391c9c31cb6949b15e69b0cab55ef (diff)
downloadscala-3deca7d95882303ed2f73b805df44c89649880f3.tar.gz
scala-3deca7d95882303ed2f73b805df44c89649880f3.tar.bz2
scala-3deca7d95882303ed2f73b805df44c89649880f3.zip
Remove unneeded overrides from ReplGLobal
These seem to have been originally added as a basis for future REPL work, for instance moving away from textual code generation to using a custom typechecker to include definitions and imports from previous lines in scope. But until such work is started, lets remove the as-yet-uneeded customizations in the name of simplicity. (Original commits by Som Snytt, extended by Jason Zaugg to remove the custom typer.)
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/scala/tools/nsc/interpreter/ReplGlobal.scala32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/ReplGlobal.scala b/src/repl/scala/tools/nsc/interpreter/ReplGlobal.scala
index 07d619bca5..cf055e0758 100644
--- a/src/repl/scala/tools/nsc/interpreter/ReplGlobal.scala
+++ b/src/repl/scala/tools/nsc/interpreter/ReplGlobal.scala
@@ -30,37 +30,5 @@ trait ReplGlobal extends Global {
val virtualDirectory = globalSettings.outputDirs.getSingleOutput.get
new util.AbstractFileClassLoader(virtualDirectory, loader) {}
}
-
- override def newTyper(context: Context): Typer = new Typer(context) {
- override def typed(tree: Tree, mode: Mode, pt: Type): Tree = {
- val res = super.typed(tree, mode, pt)
- tree match {
- case Ident(name) if !tree.symbol.hasPackageFlag && !name.toString.startsWith("$") =>
- repldbg("typed %s: %s".format(name, res.tpe))
- case _ =>
- }
- res
- }
- }
- }
-
- object replPhase extends SubComponent {
- val global: ReplGlobal.this.type = ReplGlobal.this
- val phaseName = "repl"
- val runsAfter = List[String]("typer")
- val runsRightAfter = None
- def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) {
- def apply(unit: CompilationUnit) {
- repldbg("Running replPhase on " + unit.body)
- // newNamer(rootContext(unit)).enterSym(unit.body)
- }
- }
- // add to initial or terminal phase to sanity check Run at construction
- override val requires = List("typer") // ensure they didn't -Ystop-after:parser
- }
-
- override protected def computePhaseDescriptors: List[SubComponent] = {
- addToPhasesSet(replPhase, "repl")
- super.computePhaseDescriptors
}
}