From 09d02bd3670b947da147aec40835822d894b17b0 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 17 Mar 2014 22:25:47 +0100 Subject: Allow MiniPhase to be DenotTransformer All MiniPhases now as are full-fledged phases, and are given their own periods and can register DenotTransformers. MiniPhases belonging to same group(list) will be squashed to single phase. --- src/dotty/tools/dotc/core/Contexts.scala | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dotty/tools/dotc/core/Contexts.scala') diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 38784ec0c..68daea440 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -25,7 +25,7 @@ import collection.immutable.BitSet import printing._ import config.{Settings, ScalaSettings, Platform, JavaPlatform} import language.implicitConversions - +import DenotTransformers.DenotTransformer object Contexts { /** A context is passed basically everywhere in dotc. @@ -387,7 +387,7 @@ object Contexts { def rootLoader(root: TermSymbol)(implicit ctx: Context): SymbolLoader = platform.rootLoader(root) // Set up some phases to get started */ - usePhases(SomePhase :: Nil) + usePhases(List(List(SomePhase))) /** The standard definitions */ val definitions = new Definitions @@ -460,8 +460,13 @@ object Contexts { /** Phases by id */ private[core] var phases: Array[Phase] = _ + /** Phases with consecutive Transforms groupped into a single phase */ + private [core] var squashedPhases: Array[Phase] = _ + /** Next denotation transformer id */ - private[core] var nextTransformerId: Array[Int] = _ + private[core] var nextDenotTransformerId: Array[Int] = _ + + private[core] var denotTransformers: Array[DenotTransformer] = _ // Printers state /** Number of recursive invocations of a show method on cuyrrent stack */ -- cgit v1.2.3