1 19 20 21 package soot.toolkits.graph; 22 23 import soot.*; 24 import soot.util.*; 25 import java.util.*; 26 import soot.options.Options; 27 28 29 76 public class ClassicCompleteUnitGraph extends TrapUnitGraph 77 { 78 82 public ClassicCompleteUnitGraph(Body body) 83 { 84 super(body); 86 } 87 88 89 109 protected void buildExceptionalEdges(Map unitToSuccs, Map unitToPreds) { 110 super.buildExceptionalEdges(unitToSuccs, unitToPreds); 112 for (Iterator trapIt = body.getTraps().iterator(); 115 trapIt.hasNext(); ) { 116 Trap trap = (Trap) trapIt.next(); 117 Unit firstTrapped = trap.getBeginUnit(); 118 Unit catcher = trap.getHandlerUnit(); 119 List origPredsOfTrapped = new ArrayList(getPredsOf(firstTrapped)); 127 for (Iterator unitIt = origPredsOfTrapped.iterator(); 128 unitIt.hasNext(); ) { 129 Unit pred = (Unit) unitIt.next(); 130 addEdge(unitToSuccs, unitToPreds, pred, catcher); 131 } 132 } 133 } 134 } 135 | Popular Tags |