summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/examples/plugintemplate/src/plugintemplate/standalone/PluginRunner.scala4
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala6
-rw-r--r--test/files/run/docgenerator.scala4
3 files changed, 5 insertions, 9 deletions
diff --git a/docs/examples/plugintemplate/src/plugintemplate/standalone/PluginRunner.scala b/docs/examples/plugintemplate/src/plugintemplate/standalone/PluginRunner.scala
index 979437c8c2..3068f47635 100644
--- a/docs/examples/plugintemplate/src/plugintemplate/standalone/PluginRunner.scala
+++ b/docs/examples/plugintemplate/src/plugintemplate/standalone/PluginRunner.scala
@@ -21,8 +21,8 @@ extends Global(settings, reporter) {
*/
override protected def computeInternalPhases() : Unit = {
phasesSet += syntaxAnalyzer
- phasesSet += (analyzer.namerFactory: SubComponent) // note: types are there because otherwise
- phasesSet += (analyzer.typerFactory: SubComponent) // consistency check after refchecks would fail.
+ phasesSet += analyzer.namerFactory: SubComponent
+ phasesSet += analyzer.typerFactory: SubComponent
phasesSet += superAccessors // add super accessors
phasesSet += pickler // serialize symbol tables
phasesSet += refchecks // perform reference and override checking, translate nested objects
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index ef243c1b06..ecd7bdc6de 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -541,6 +541,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
/* 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
@@ -556,11 +557,6 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
}
- protected def insertBefore(c: SubComponent, cs: List[SubComponent], before: SubComponent): List[SubComponent] = cs match {
- case List() => List(c)
- case c1 :: cs1 => if (c1 == before) c :: cs else c1 :: insertBefore(c, cs1, before)
- }
-
private var curRun: Run = null
def currentRun: Run = curRun
private var curRunId = 0
diff --git a/test/files/run/docgenerator.scala b/test/files/run/docgenerator.scala
index 7db8e85a60..ccb5b50ed6 100644
--- a/test/files/run/docgenerator.scala
+++ b/test/files/run/docgenerator.scala
@@ -119,8 +119,8 @@ object Foo2 {
object compiler extends Global(command.settings, reporter) {
override protected def computeInternalPhases() : Unit = {
phasesSet += syntaxAnalyzer
- phasesSet += (analyzer.namerFactory: SubComponent) // note: types are there because otherwise
- phasesSet += (analyzer.typerFactory: SubComponent) // consistency check after refchecks would fail.
+ phasesSet += analyzer.namerFactory
+ phasesSet += analyzer.typerFactory
}
override def onlyPresentation = true
}