1 19 20 21 package soot.toolkits.graph; 22 23 import java.util.*; 24 import soot.*; 25 import java.io.*; 26 27 44 45 public class ClassicCompleteBlockGraph extends BlockGraph 46 { 47 61 public ClassicCompleteBlockGraph(Body body) 62 { 63 super(new ClassicCompleteUnitGraph(body)); 64 } 65 66 67 76 public ClassicCompleteBlockGraph(ClassicCompleteUnitGraph unitGraph) 77 { 78 super(unitGraph); 79 Unit entryPoint = (Unit) (getBody().getUnits().getFirst()); 81 List newHeads = new ArrayList(1); 82 for (Iterator blockIt = getBlocks().iterator(); blockIt.hasNext(); ) { 83 Block b = (Block) blockIt.next(); 84 if (b.getHead() == entryPoint) { 85 newHeads.add(b); 86 break; 87 } 88 } 89 mHeads = Collections.unmodifiableList(newHeads); 90 mTails = Collections.EMPTY_LIST; 91 92 soot.util.PhaseDumper.v().dumpGraph(this, mBody); 93 } 94 } 95 96 97 | Popular Tags |