diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-02-01 13:51:26 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-02-01 13:51:26 +0000 |
commit | 0ec22a89f29607d02c0a5419beaed73d07abc488 (patch) | |
tree | 8be84d75e2676f4d31a0034c6b76e4957e290884 /src/compiler/scala/tools/nsc/Global.scala | |
parent | c9a4b1fd73e4900814f32fca4c740aa027036230 (diff) | |
download | scala-0ec22a89f29607d02c0a5419beaed73d07abc488.tar.gz scala-0ec22a89f29607d02c0a5419beaed73d07abc488.tar.bz2 scala-0ec22a89f29607d02c0a5419beaed73d07abc488.zip |
Some cosmetic changes in non-plugin files.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 72fa167f8e..add033d6d4 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -79,6 +79,10 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable val copy = new LazyTreeCopier(); + val comments = + if (onlyPresentation) new HashMap[Symbol,String]; + else null; + // reporting ------------------------------------------------------- def error(msg: String) = reporter.error(null, msg); @@ -118,7 +122,9 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable new SourceReader(charset.newDecoder()); } - val classPath = new ClassPath.Build( + val classPath0 = new ClassPath(onlyPresentation); + + val classPath = new classPath0.Build( settings.classpath.value, settings.sourcepath.value, settings.outdir.value, @@ -286,12 +292,7 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable private var curRun: Run = NoRun; override def currentRun: Run = curRun; - class TyperRun extends Run { - override val terminalPhase : Phase = typerPhase.next.next; - //override val terminalPhase : Phase = superAccessors.next; - } - - + def onlyPresentation = false; class Run extends CompilerRun { var currentUnit : CompilationUnit = _; @@ -329,11 +330,6 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable (phaseDescriptors.length+1) * fileset.size); - - override val terminalPhase : Phase = new GlobalPhase(p) { - def name = "terminal"; - def apply(unit: CompilationUnit): unit = {} - } override def phaseNamed(name: String): Phase = { var p: Phase = firstPhase; while (p.next != p && p.name != name) p = p.next; @@ -351,6 +347,13 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable private var unitbuf = new ListBuffer[CompilationUnit]; private var fileset = new HashSet[AbstractFile]; + override val terminalPhase : Phase = + if (onlyPresentation) typerPhase.next.next; + else new GlobalPhase(p) { + def name = "terminal"; + def apply(unit: CompilationUnit): unit = {} + } + private def addUnit(unit: CompilationUnit): unit = { unitbuf += unit; fileset += unit.source.getFile(); |