From 7aa65416ea09470ae24353c36a51f07c5fc1e8a6 Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 19 Feb 2015 15:45:36 +0100 Subject: Allow disabling squarshing Do not die if phases aren't squashed --- src/dotty/tools/dotc/core/Contexts.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index b11e77ef2..bd7de6bb5 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -487,13 +487,13 @@ object Contexts { def rootLoader(root: TermSymbol)(implicit ctx: Context): SymbolLoader = platform.rootLoader(root) // Set up some phases to get started */ - usePhases(List(List(SomePhase))) + usePhases(List(SomePhase)) /** The standard definitions */ val definitions = new Definitions def squashed(p: Phase): Phase = { - squashedPhases.find(_.period.containsPhaseId(p.id)).getOrElse(NoPhase) + allPhases.find(_.period.containsPhaseId(p.id)).getOrElse(NoPhase) } } @@ -560,11 +560,14 @@ object Contexts { * of underlying during a controlled operation exists. */ private[core] val pendingUnderlying = new mutable.HashSet[Type] + + private [core] var phasesPlan: List[List[Phase]] = _ + // Phases state /** Phases by id */ private[core] var phases: Array[Phase] = _ - /** Phases with consecutive Transforms groupped into a single phase */ + /** Phases with consecutive Transforms groupped into a single phase, null if squashing is disabled */ private [core] var squashedPhases: Array[Phase] = _ /** Next denotation transformer id */ -- cgit v1.2.3