forgot to make tabbing
authorjjenista <jjenista>
Wed, 3 Sep 2008 23:05:11 +0000 (23:05 +0000)
committerjjenista <jjenista>
Wed, 3 Sep 2008 23:05:11 +0000 (23:05 +0000)
Robust/src/Analysis/OwnershipAnalysis/OwnershipAnalysis.java
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java

index 45f52593b8f6a435a4b4de41f3cc3e6e340931ae..1c3707df48a72e414651452edf029d9d593135b4 100644 (file)
@@ -211,7 +211,7 @@ public class OwnershipAnalysis {
   // this analysis generates an ownership graph for every task
   // in the program
   public OwnershipAnalysis(State state,
-                          TypeUtil tu,
+                           TypeUtil tu,
                            CallGraph callGraph,
                            int allocationDepth,
                            boolean writeFinalGraphs,
@@ -407,9 +407,9 @@ public class OwnershipAnalysis {
       // ownership graph made from the merge of the
       // parent graphs
       og = analyzeFlatNode(mDesc,
-                          fn,
-                          returnNodesToCombineForCompleteOwnershipGraph,
-                          og);
+                           fn,
+                           returnNodesToCombineForCompleteOwnershipGraph,
+                           og);
 
       // if the results of the new graph are different from
       // the current graph at this node, replace the graph
index bda12c73eb47886e8e1249d6889ba57c8465ae95..9f8f39505b5e227a0fc55cd331af06170a0075e2 100644 (file)
@@ -1299,8 +1299,8 @@ public class OwnershipGraph {
          Iterator srcItr = possibleCallerSrcs.iterator();
          while( srcItr.hasNext() ) {
            HeapRegionNode src = (HeapRegionNode) srcItr.next();
-           
-           if( !hasMatchingField( src, edgeCallee ) ) {
+
+           if( !hasMatchingField(src, edgeCallee) ) {
              // prune this source node possibility
              continue;
            }
@@ -1309,7 +1309,7 @@ public class OwnershipGraph {
            while( dstItr.hasNext() ) {
              HeapRegionNode dst = (HeapRegionNode) dstItr.next();
 
-             if( !hasMatchingType( edgeCallee, dst ) ) {
+             if( !hasMatchingType(edgeCallee, dst) ) {
                // prune
                continue;
              }
@@ -1374,7 +1374,7 @@ public class OwnershipGraph {
        while( itrHrn.hasNext() ) {
          HeapRegionNode hrnCaller = itrHrn.next();
 
-         if( !hasMatchingType( edgeCallee, hrnCaller ) ) {
+         if( !hasMatchingType(edgeCallee, hrnCaller) ) {
            // prune
            continue;
          }
@@ -1468,17 +1468,21 @@ public class OwnershipGraph {
   }
 
 
-  protected boolean hasMatchingField( HeapRegionNode src, ReferenceEdge edge ) {
-    
+  protected boolean hasMatchingField(HeapRegionNode src, ReferenceEdge edge) {
+
     // if no allocation site, then it's a match-everything region
     AllocationSite asSrc = src.getAllocationSite();
-    if( asSrc == null ) { return true; }
-    
+    if( asSrc == null ) {
+      return true;
+    }
+
     TypeDescriptor tdSrc = asSrc.getType();
     assert tdSrc != null;
 
     // if it's not a class, it doesn't have any fields to match
-    if( !tdSrc.isClass() ) { return false; }
+    if( !tdSrc.isClass() ) {
+      return false;
+    }
 
     Iterator fieldsSrcItr = tdSrc.getClassDesc().getFields();
     while( fieldsSrcItr.hasNext() ) {
@@ -1494,11 +1498,13 @@ public class OwnershipGraph {
   }
 
 
-  protected boolean hasMatchingType( ReferenceEdge edge, HeapRegionNode dst ) {
+  protected boolean hasMatchingType(ReferenceEdge edge, HeapRegionNode dst) {
 
     // if the region has no type, matches everything
     AllocationSite asDst = dst.getAllocationSite();
-    if( asDst == null ) { return true; }
+    if( asDst == null ) {
+      return true;
+    }
 
     TypeDescriptor tdDst = asDst.getType();
     assert tdDst != null;
@@ -1506,15 +1512,19 @@ public class OwnershipGraph {
     // if the type is not a class don't match because
     // primitives are copied, no memory aliases
     ClassDescriptor cdDst = tdDst.getClassDesc();
-    if( cdDst == null ) { return false; }
+    if( cdDst == null ) {
+      return false;
+    }
 
     // if the field is null, it matches everything
     FieldDescriptor fd = edge.getFieldDesc();
-    if( fd == null ) { return true; }
+    if( fd == null ) {
+      return true;
+    }
     TypeDescriptor tdFd = fd.getType();
     assert tdFd != null;
 
-    return typeUtil.isSuperorType( tdFd, tdDst );
+    return typeUtil.isSuperorType(tdFd, tdDst);
   }