diff options
author | Martin Odersky <odersky@gmail.com> | 2014-12-14 15:34:50 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-12-14 15:39:32 +0100 |
commit | db989f9d6552e1f663474d9983199dea00f87864 (patch) | |
tree | 5fd7ae114ad179be841ec4a6926a61ff393262f7 /src/dotty/tools | |
parent | 670f6024cfbc97f73d1534e10a602e8bdccf0e48 (diff) | |
download | dotty-db989f9d6552e1f663474d9983199dea00f87864.tar.gz dotty-db989f9d6552e1f663474d9983199dea00f87864.tar.bz2 dotty-db989f9d6552e1f663474d9983199dea00f87864.zip |
Make Literalize run at new default phase thisTransform.next
Diffstat (limited to 'src/dotty/tools')
4 files changed, 8 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/transform/InterceptedMethods.scala b/src/dotty/tools/dotc/transform/InterceptedMethods.scala index c4f5d4dac..cfdb0af0c 100644 --- a/src/dotty/tools/dotc/transform/InterceptedMethods.scala +++ b/src/dotty/tools/dotc/transform/InterceptedMethods.scala @@ -40,11 +40,12 @@ import StdNames._ * using the most precise overload available * - `x.getClass` for getClass in primitives becomes `x.getClass` with getClass in class Object. */ -class InterceptedMethods extends MiniPhaseTransform { +class InterceptedMethods extends MiniPhaseTransform { thisTransform => import tpd._ override def phaseName: String = "intercepted" + override def treeTransformPhase = thisTransform.next private var getClassMethods: Set[Symbol] = _ private var poundPoundMethods: Set[Symbol] = _ diff --git a/src/dotty/tools/dotc/transform/Literalize.scala b/src/dotty/tools/dotc/transform/Literalize.scala index 79f0dd493..95b3fb7a3 100644 --- a/src/dotty/tools/dotc/transform/Literalize.scala +++ b/src/dotty/tools/dotc/transform/Literalize.scala @@ -15,10 +15,11 @@ import ast.Trees._ * The constant types are eliminated by erasure, so we need to keep * the info about constantness in the trees. */ -class Literalize extends MiniPhaseTransform { +class Literalize extends MiniPhaseTransform { thisTransform => import ast.tpd._ override def phaseName: String = "literalize" + override def treeTransformPhase = thisTransform.next /** Note: Demanding idempotency instead of purity is strictly speaking too loose. * Example diff --git a/src/dotty/tools/dotc/transform/Splitter.scala b/src/dotty/tools/dotc/transform/Splitter.scala index 823485af9..91072891f 100644 --- a/src/dotty/tools/dotc/transform/Splitter.scala +++ b/src/dotty/tools/dotc/transform/Splitter.scala @@ -12,10 +12,11 @@ import Contexts._, Types._, Decorators._, Denotations._, Symbols._, SymDenotatio * * For now, only self references are treated. */ -class Splitter extends MiniPhaseTransform { +class Splitter extends MiniPhaseTransform { thisTransform => import ast.tpd._ override def phaseName: String = "splitter" + override def treeTransformPhase = thisTransform.next /** Replace self referencing idents with ThisTypes. */ override def transformIdent(tree: Ident)(implicit ctx: Context, info: TransformerInfo) = tree.tpe match { diff --git a/src/dotty/tools/dotc/transform/TailRec.scala b/src/dotty/tools/dotc/transform/TailRec.scala index 57f1336ed..f4e95830d 100644 --- a/src/dotty/tools/dotc/transform/TailRec.scala +++ b/src/dotty/tools/dotc/transform/TailRec.scala @@ -62,13 +62,14 @@ import dotty.tools.dotc.transform.TreeTransforms.{TransformerInfo, MiniPhaseTran * self recursive functions, that's why it's renamed to tailrec * </p> */ -class TailRec extends MiniPhaseTransform with DenotTransformer with FullParameterization { +class TailRec extends MiniPhaseTransform with DenotTransformer with FullParameterization { thisTransform => import dotty.tools.dotc.ast.tpd._ override def transform(ref: SingleDenotation)(implicit ctx: Context): SingleDenotation = ref override def phaseName: String = "tailrec" + override def treeTransformPhase = thisTransform // TODO Make sure tailrec runs at next phase. final val labelPrefix = "tailLabel" final val labelFlags = Flags.Synthetic | Flags.Label |