summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/SubComponent.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/SubComponent.scala')
-rw-r--r--src/compiler/scala/tools/nsc/SubComponent.scala18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/SubComponent.scala b/src/compiler/scala/tools/nsc/SubComponent.scala
index 625d07bb98..42008b58d2 100644
--- a/src/compiler/scala/tools/nsc/SubComponent.scala
+++ b/src/compiler/scala/tools/nsc/SubComponent.scala
@@ -18,6 +18,22 @@ abstract class SubComponent {
/** The name of the phase */
val phaseName: String
+ /** List of phase names, this phase should run after */
+ val runsAfter: List[String]
+
+ /** List of phase names, this phase should run before */
+ val runsBefore: List[String] = Nil
+
+ /** Phase name this phase will attach itself to, not allowing any phase to come between it
+ * and the phase name declared */
+ val runsRightAfter: Option[String]
+
+ /** Internal flag to tell external from internal phases */
+ val internal: Boolean = true
+
+ /** SubComponent are added to a HashSet and two phases are the same if they have the same name */
+ override def hashCode() = phaseName.hashCode()
+
/** New flags defined by the phase which are not valid before */
def phaseNewFlags: Long = 0
@@ -40,7 +56,7 @@ abstract class SubComponent {
}
/** The phase defined by this subcomponent. Can be called only after phase is installed by newPhase. */
-// lazy val ownPhase: Phase = global.currentRun.phaseNamed(phaseName)
+ // lazy val ownPhase: Phase = global.currentRun.phaseNamed(phaseName)
/** A standard phase template */
abstract class StdPhase(prev: Phase) extends global.GlobalPhase(prev) {