From fadb306fdf3d37284fd29c50aa3956cabe79480d Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 26 Sep 2012 11:36:01 -0700 Subject: PluginComponent contributes description to -Xshow-phases. In Global, SubComponent is called a phase descriptor, but it doesn't actually have a description. (Phase itself does.) This fix adds a description to PluginComponent so that plugins can describe what they do in -Xshow-phases. Elliptical descriptions Exploded archives Plugged-in partest Roundup at the Little h! --- .../plugin/scala/tools/selectivecps/SelectiveANFTransform.scala | 3 ++- .../plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/continuations/plugin') diff --git a/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala b/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala index f62eebaaa0..36f0253243 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala @@ -17,13 +17,14 @@ abstract class SelectiveANFTransform extends PluginComponent with Transform with import definitions._ // standard classes and methods import typer.atOwner // methods to type trees + override def description = "ANF pre-transform for @cps" + /** the following two members override abstract members in Transform */ val phaseName: String = "selectiveanf" protected def newTransformer(unit: CompilationUnit): Transformer = new ANFTransformer(unit) - class ANFTransformer(unit: CompilationUnit) extends TypingTransformer(unit) { implicit val _unit = unit // allow code in CPSUtils.scala to report errors diff --git a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala index 801c328177..f61828debc 100644 --- a/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala +++ b/src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala @@ -17,6 +17,8 @@ abstract class SelectiveCPSTransform extends PluginComponent with import definitions._ // standard classes and methods import typer.atOwner // methods to type trees + override def description = "@cps-driven transform of selectiveanf assignments" + /** the following two members override abstract members in Transform */ val phaseName: String = "selectivecps" -- cgit v1.2.3