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;
}
Aggregations