String phaseName = phaseStack.currentPhase(); if (isCFGDumpingPhase(phaseName)) { try {
/** * Tells the <code>PhaseDumper</code> that a {@link Body} transforming phase has ended, so that it can dump the phases's * “after” file. * * @param b * the {@link Body} being transformed. * * @param phaseName * the name of the phase that has just ended. * * @throws IllegalArgumentException * if <code>phaseName</code> does not match the <code>PhaseDumper</code>'s record of the current phase. */ public void dumpAfter(Body b, String phaseName) { String poppedPhaseName = phaseStack.pop(); if (poppedPhaseName != phaseName) { throw new IllegalArgumentException("dumpAfter(" + phaseName + ") when poppedPhaseName == " + poppedPhaseName); } if (isBodyDumpingPhase(phaseName)) { dumpBody(b, phaseName + ".out"); } }
String phaseName = phaseStack.currentPhase(); if (isCFGDumpingPhase(phaseName)) { try {
/** * Tells the <code>PhaseDumper</code> that a {@link Scene} transforming phase has ended, so that it can dump the phases's * “after” files. * * @param phaseName * the name of the phase that has just ended. * * @throws IllegalArgumentException * if <code>phaseName</code> does not match the <code>PhaseDumper</code>'s record of the current phase. */ public void dumpAfter(String phaseName) { String poppedPhaseName = phaseStack.pop(); if (poppedPhaseName != phaseName) { throw new IllegalArgumentException("dumpAfter(" + phaseName + ") when poppedPhaseName == " + poppedPhaseName); } if (isBodyDumpingPhase(phaseName)) { dumpAllBodies(phaseName + ".out", false); } }
/** * Tells the <code>PhaseDumper</code> that a {@link Body} transforming phase has started, so that it can dump the phases's * “before” file. If the phase is to be dumped, <code>dumpBefore</code> deletes any old graph files dumped * during previous runs of the phase. * * @param b * the {@link Body} being transformed. * @param phaseName * the name of the phase that has just started. */ public void dumpBefore(Body b, String phaseName) { phaseStack.push(phaseName); if (isBodyDumpingPhase(phaseName)) { deleteOldGraphFiles(b, phaseName); dumpBody(b, phaseName + ".in"); } }
boolean empty() { return (this.size() == 0); }
/** * Tells the <code>PhaseDumper</code> that a {@link Scene} transforming phase has started, so that it can dump the phases's * “before” files. If the phase is to be dumped, <code>dumpBefore</code> deletes any old graph files dumped * during previous runs of the phase. * * @param phaseName * the name of the phase that has just started. */ public void dumpBefore(String phaseName) { phaseStack.push(phaseName); if (isBodyDumpingPhase(phaseName)) { dumpAllBodies(phaseName + ".in", true); } }
String push(String phaseName) { this.add(phaseName); return phaseName; } }