Set done = new HashSet(); SIRWorkFunction[] phases = self.getInitPhases(); for (int i = 0; phases != null && i < phases.length; i++) { JMethodDeclaration phase = phases[i].getWork(); if (!done.contains(phase)) { done.add(phase); addEntryExit(phase); removeStructureNew(phase); } } phases = self.getPhases(); for (int i = 0; phases != null && i < phases.length; i++) { JMethodDeclaration phase = phases[i].getWork(); if (!done.contains(phase)) { done.add(phase); addEntryExit(phase); removeStructureNew(phase); } }
doGeneralFilter(self);
    public void visitPhasedFilter(SIRPhasedFilter self,                                  SIRPhasedFilterIter iter) {        // At the point we're here, all of the calls to direct phases        // have been directly inserted.  We want to nuke the        // work function and update the phase functions.        Set done = new HashSet();        SIRWorkFunction[] phases = self.getInitPhases();        for (int i = 0; phases != null && i < phases.length; i++)        {            JMethodDeclaration phase = phases[i].getWork();            if (!done.contains(phase))            {                done.add(phase);                addEntryExit(phase);                removeStructureNew(phase);            }        }        phases = self.getPhases();        for (int i = 0; phases != null && i < phases.length; i++)        {            JMethodDeclaration phase = phases[i].getWork();            if (!done.contains(phase))            {                done.add(phase);                addEntryExit(phase);                removeStructureNew(phase);            }        }    }