diff options
author | Paul Phillips <paulp@improving.org> | 2009-09-06 02:32:14 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-09-06 02:32:14 +0000 |
commit | c980b574ba8747d7f0adbeaf1e53fb3850dae840 (patch) | |
tree | 938fb2e462421de1be0c936d7779abf52d493a82 /src/compiler/scala/tools/nsc/Global.scala | |
parent | 822b93ac9baa48e510a12f2eae81a290926e06e6 (diff) | |
download | scala-c980b574ba8747d7f0adbeaf1e53fb3850dae840.tar.gz scala-c980b574ba8747d7f0adbeaf1e53fb3850dae840.tar.bz2 scala-c980b574ba8747d7f0adbeaf1e53fb3850dae840.zip |
Converts some "lazy vals by hand" (probably pre...
Converts some "lazy vals by hand" (probably predating the availability
of lazy vals) to lazy vals. Streamlined some Plugin(s) logic and took
minor advantage of scala.io.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 02d65d7e05..56b8253fa7 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -623,18 +623,12 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable buildCompilerFromPhasesSet() // PhaseAssembly.scala } - /* Simple option value to hold the compiler phase chain */ - private var phasesCache: Option[List[SubComponent]] = None + /* The phase descriptor list */ + lazy val phaseDescriptors: List[SubComponent] = computePhaseDescriptors /* The set of phase objects that is the basis for the compiler phase chain */ protected val phasesSet : HashSet[SubComponent] = new HashSet[SubComponent] - /** A accessor for the phase descriptor list (List of SubComponents), Only calculate the list once */ - def phaseDescriptors = { - if (phasesCache.isEmpty) phasesCache = Some(computePhaseDescriptors) - phasesCache.get - } - /** A description of the phases that will run */ def phaseDescriptions: String = { new Run // force some initialization |