summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2010-12-21 18:39:57 +0000
committerIulian Dragos <jaguarul@gmail.com>2010-12-21 18:39:57 +0000
commit8aff48b504dc520a58d113cc95f6c5997970da7c (patch)
tree2d1aad794423423c001de522ec12d292a32877ea /src/compiler
parent003fc687839528bf99b44a415a038eb13ef8eae5 (diff)
downloadscala-8aff48b504dc520a58d113cc95f6c5997970da7c.tar.gz
scala-8aff48b504dc520a58d113cc95f6c5997970da7c.tar.bz2
scala-8aff48b504dc520a58d113cc95f6c5997970da7c.zip
Added settings for presentation compiler debugg...
Added settings for presentation compiler debugging options. no review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala7
-rw-r--r--src/compiler/scala/tools/nsc/settings/ScalaSettings.scala11
2 files changed, 11 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index afb4c2268e..dbefdf4904 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -25,9 +25,8 @@ self =>
import definitions._
- val debugIDE = false
-
- var verboseIDE = false
+ val debugIDE: Boolean = settings.YpresentationDebug.value
+ val verboseIDE: Boolean = settings.YpresentationVerbose.value
/** Print msg only when debugIDE is true. */
@inline final def debugLog(msg: => String) =
@@ -292,11 +291,13 @@ self =>
// remove any files in first that are no longer maintained by presentation compiler (i.e. closed)
allSources = allSources filter (s => unitOfFile contains (s.file))
+ informIDE("Parsing %d files.".format(allSources.size))
for (s <- allSources) {
val unit = unitOf(s)
if (unit.status == NotLoaded) parse(unit)
}
+ informIDE("Typechecking %d files.".format(allSources.size))
for (s <- allSources) {
val unit = unitOf(s)
if (!unit.isUpToDate) typeCheck(unit)
diff --git a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
index 372c216d7a..20a93edb5f 100644
--- a/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
+++ b/src/compiler/scala/tools/nsc/settings/ScalaSettings.scala
@@ -79,10 +79,6 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings {
// Experimental Extensions
val Xexperimental = BooleanSetting ("-Xexperimental", "Enable experimental extensions.") .
withPostSetHook(set => List(YdepMethTpes, YmethodInfer) foreach (_.value = set.value)) //YvirtClasses,
- val YdepMethTpes = BooleanSetting ("-Ydependent-method-types", "Allow dependent method types.")
- val YmethodInfer = BooleanSetting ("-Yinfer-argument-types", "Infer types for arguments of overriden methods.")
- val noSelfCheck = BooleanSetting ("-Yno-self-type-checks", "Suppress check for self-type conformance among inherited members.")
- val YvirtClasses = false // too embryonic to even expose as a -Y //BooleanSetting ("-Yvirtual-classes", "Support virtual classes")
/** Compatibility stubs for options whose value name did
* not previously match the option name.
@@ -144,6 +140,13 @@ trait ScalaSettings extends AbsScalaSettings with StandardScalaSettings {
val Ypmatnaive = BooleanSetting ("-Ypmat-naive", "Desugar matches as naively as possible.")
val Ymurmur = BooleanSetting ("-Ymurmur", "Use Murmur hash algorithm for case class generated hashCodes.")
val Ynotnull = BooleanSetting ("-Ynotnull", "Enable (experimental and incomplete) scala.NotNull.")
+ val YdepMethTpes = BooleanSetting ("-Ydependent-method-types", "Allow dependent method types.")
+ val YmethodInfer = BooleanSetting ("-Yinfer-argument-types", "Infer types for arguments of overriden methods.")
+ val noSelfCheck = BooleanSetting ("-Yno-self-type-checks", "Suppress check for self-type conformance among inherited members.")
+ val YvirtClasses = false // too embryonic to even expose as a -Y //BooleanSetting ("-Yvirtual-classes", "Support virtual classes")
+
+ val YpresentationVerbose = BooleanSetting("-YpresentationVerbose", "Print information about presentation compiler tasks.")
+ val YpresentationDebug = BooleanSetting("-Ypresentation-debug", "Enable debugging output for the presentation compiler.")
// Warnings
val Ywarndeadcode = BooleanSetting ("-Ywarn-dead-code", "Emit warnings for dead code")