scala/scala — pull request #1506 by som-snytt (2012-10-16 23:15:59+00:00)
Title: PluginComponent contributes description to -Xshow-phases. (Fixes SI-6446)

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.

To avoid chaos, as per the formatting comments in Global.scala, -Xshow-phases output is restricted to 80 columns. As an aid, inlineExceptionHandlers is renamed to inlineHandlers.

Phase descriptions are provided for the CPS components.

A minimal test is provided for -Xshow-phases with a custom plugin. Plugin loading and partest are modified so that a test can provide a plugin. (Plugin loading accepts an exploded jar, and partest replaces "dot" or cwd with output dir. This means a test can contribute just one plugin.)

(One could imagine testing a compiler component by supplying a test phase that creates possibly screwy trees, for example to test robustness.)