public class PhaseDumper
extends java.lang.Object
bodyDumpingPhases list, then the intermediate
representation of the bodies being manipulated by the phase is
dumped before and after the phase is applied. If a phase is on the
cfgDumpingPhases list, then whenever a CFG is
constructed during the phase, a dot file is dumped representing the
CFG constructed.| Constructor and Description |
|---|
PhaseDumper(Singletons.Global g) |
| Modifier and Type | Method and Description |
|---|---|
void |
dumpAfter(Body b,
java.lang.String phaseName)
Tells the
PhaseDumper that a Body
transforming phase has ended, so that it can dump the
phases's “after” file. |
void |
dumpAfter(java.lang.String phaseName)
Tells the
PhaseDumper that a Scene
transforming phase has ended, so that it can dump the
phases's “after” files. |
void |
dumpBefore(Body b,
java.lang.String phaseName)
Tells the
PhaseDumper that a Body
transforming phase has started, so that it can dump the
phases's “before” file. |
void |
dumpBefore(java.lang.String phaseName)
Tells the
PhaseDumper that a Scene
transforming phase has started, so that it can dump the
phases's “before” files. |
void |
dumpBody(Body b,
java.lang.String baseName) |
void |
dumpGraph(DirectedGraph g,
Body b)
Asks the
PhaseDumper to dump the passed DirectedGraph if the current phase is being dumped. |
void |
dumpGraph(ExceptionalGraph g)
Asks the
PhaseDumper to dump the passed ExceptionalGraph if the current phase is being dumped. |
void |
printCurrentStackTrace()
Prints the current stack trace, as a brute force tool for
program understanding.
|
static PhaseDumper |
v()
Returns the single instance of
PhaseDumper. |
public static PhaseDumper v()
PhaseDumper.PhaseDumper.public void dumpBody(Body b, java.lang.String baseName)
public void dumpBefore(Body b, java.lang.String phaseName)
PhaseDumper that a Body
transforming phase has started, so that it can dump the
phases's “before” file. If the phase is to be
dumped, dumpBefore deletes any old
graph files dumped during previous runs of the phase.b - the Body being transformed.phaseName - the name of the phase that has just started.public void dumpAfter(Body b, java.lang.String phaseName)
PhaseDumper that a Body
transforming phase has ended, so that it can dump the
phases's “after” file.b - the Body being transformed.phaseName - the name of the phase that has just ended.java.lang.IllegalArgumentException - if phaseName does not
match the PhaseDumper's record of the current phase.public void dumpBefore(java.lang.String phaseName)
PhaseDumper that a Scene
transforming phase has started, so that it can dump the
phases's “before” files. If the phase is to be
dumped, dumpBefore deletes any old
graph files dumped during previous runs of the phase.phaseName - the name of the phase that has just started.public void dumpAfter(java.lang.String phaseName)
PhaseDumper that a Scene
transforming phase has ended, so that it can dump the
phases's “after” files.phaseName - the name of the phase that has just ended.java.lang.IllegalArgumentException - if phaseName does not
match the PhaseDumper's record of the current phase.public void dumpGraph(DirectedGraph g, Body b)
PhaseDumper to dump the passed DirectedGraph if the current phase is being dumped.g - the graph to dump.body - the Body represented by g.public void dumpGraph(ExceptionalGraph g)
PhaseDumper to dump the passed ExceptionalGraph if the current phase is being dumped.g - the graph to dump.public void printCurrentStackTrace()