summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-10-07 22:18:59 +0000
committerPaul Phillips <paulp@improving.org>2010-10-07 22:18:59 +0000
commit001e910f9774b2da00da2d56b7ba92d78a9c20ce (patch)
tree9216c2bc6192554894544a2e73d29da7e4e60b47 /src/compiler/scala/tools/nsc/Global.scala
parent68aafb29c162c117d87ef4786ee2226bd08663bc (diff)
downloadscala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.tar.gz
scala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.tar.bz2
scala-001e910f9774b2da00da2d56b7ba92d78a9c20ce.zip
Did a bunch of symbol oriented work on checkers.
changes in Global and Typer to accomodate this, and renamed "Checkers" to "ICodeCheckers" to make some less confusing space for the future "SymbolCheckers". No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index ff3a5cdc0b..d3f505d0e2 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -24,7 +24,7 @@ import ast.parser._
import typechecker._
import transform._
-import backend.icode.{ ICodes, GenICode, Checkers }
+import backend.icode.{ ICodes, GenICode, ICodeCheckers }
import backend.{ ScalaPrimitives, Platform, MSILPlatform, JavaPlatform }
import backend.jvm.GenJVM
import backend.opt.{ Inliners, ClosureElimination, DeadCodeElimination }
@@ -78,11 +78,6 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
val global: Global.this.type = Global.this
} with ConstantFolder
- /** Tree checker (used for testing and debugging) */
- object checker extends {
- val global: Global.this.type = Global.this
- } with TreeCheckers
-
/** ICode generator */
object icodes extends {
val global: Global.this.type = Global.this
@@ -98,11 +93,6 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
val global: Global.this.type = Global.this
} with CopyPropagation
- /** Icode verification */
- object checkers extends {
- val global: Global.this.type = Global.this
- } with Checkers
-
/** Some statistics (normally disabled) */
object statistics extends {
val global: Global.this.type = Global.this
@@ -515,7 +505,21 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
val runsRightAfter = None
} with SampleTransform
- object icodeChecker extends checkers.ICodeChecker()
+ /** The checkers are for validating the compiler data structures
+ * at phase boundaries.
+ */
+
+ /** Tree checker */
+ object treeChecker extends {
+ val global: Global.this.type = Global.this
+ } with TreeCheckers
+
+ /** Icode verification */
+ object icodeCheckers extends {
+ val global: Global.this.type = Global.this
+ } with ICodeCheckers
+
+ object icodeChecker extends icodeCheckers.ICodeChecker()
object typer extends analyzer.Typer(
analyzer.NoContext.make(EmptyTree, Global.this.definitions.RootClass, new Scope))
@@ -777,7 +781,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
phase = globalPhase
inform("[Now checking: " + phase.prev.name + "]")
if (globalPhase.id >= icodePhase.id) icodeChecker.checkICodes
- else checker.checkTrees
+ else treeChecker.checkTrees
}
else inform("[Not checkable: " + globalPhase.prev.name + "]")
}