summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-06-06 23:53:50 +0000
committerPaul Phillips <paulp@improving.org>2011-06-06 23:53:50 +0000
commitb8575e9636004b4abfbd5cd4b0a71c39bf8b1127 (patch)
treef1c107751ae890f3c0b19e349fc2a32481c84658 /src/compiler/scala/tools/nsc/Global.scala
parent29cdb5837ca05a883093bb0e7ddfac264c84afea (diff)
downloadscala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.tar.gz
scala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.tar.bz2
scala-b8575e9636004b4abfbd5cd4b0a71c39bf8b1127.zip
Proliferating the number of debugging modes bec...
Proliferating the number of debugging modes because it's still way too hard to see what's going on in there. Until we get hubert's type debugger with its whiz-bang whizbanginess, we'll have to struggle along with somewhat prettier ascii. This introduces: -Yinfer-debug which tries to print in readable fashion what is happening in the worlds of inference and implicit search. It should be made a bit more complementary and less overlappy with -Ytyper-debug. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 0f5be1791b..c777652706 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -247,7 +247,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
// debugging
def checkPhase = wasActive(settings.check)
def logPhase = isActive(settings.log)
- def typerDebug = settings.Ytyperdebug.value
def writeICode = settings.writeICode.value
// showing/printing things
@@ -270,9 +269,10 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
def profileClass = settings.YprofileClass.value
def profileMem = settings.YprofileMem.value
- // XXX: short term, but I can't bear to add another option.
- // scalac -Dscala.timings will make this true.
+ // shortish-term property based options
def timings = sys.props contains "scala.timings"
+ def inferDebug = (sys.props contains "scalac.debug.infer") || settings.Yinferdebug.value
+ def typerDebug = (sys.props contains "scalac.debug.typer") || settings.Ytyperdebug.value
}
// True if -Xscript has been set, indicating a script run.
@@ -350,6 +350,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
/** Switch to turn on detailed type logs */
var printTypings = opt.typerDebug
+ var printInfers = opt.inferDebug
// phaseName = "parser"
object syntaxAnalyzer extends {