Search in sources :

Example 1 with IRegion

use of soot.toolkits.graph.pdg.IRegion in project soot by Sable.

the class HashMutablePDG method getPreorderRegionList.

public static List<IRegion> getPreorderRegionList(IRegion r) {
    List<IRegion> list = new ArrayList<IRegion>();
    Queue<IRegion> toProcess = new LinkedList<IRegion>();
    toProcess.add(r);
    while (!toProcess.isEmpty()) {
        IRegion reg = toProcess.poll();
        list.add(reg);
        for (Iterator<IRegion> itr = reg.getChildRegions().iterator(); itr.hasNext(); ) toProcess.add((Region) itr.next());
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) IRegion(soot.toolkits.graph.pdg.IRegion) IRegion(soot.toolkits.graph.pdg.IRegion) LinkedList(java.util.LinkedList)

Aggregations

ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 IRegion (soot.toolkits.graph.pdg.IRegion)1