don't do strong updates on array element references
authorjjenista <jjenista>
Mon, 23 Mar 2009 19:57:58 +0000 (19:57 +0000)
committerjjenista <jjenista>
Mon, 23 Mar 2009 19:57:58 +0000 (19:57 +0000)
Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java
Robust/src/Tests/OwnershipAnalysisTest/smalltest/makefile

index b0733de9a8c8b37e9a9d7ec4fe723755baf76a09..004d192d0eb99685c269a5b08452153715880cca 100644 (file)
@@ -395,6 +395,7 @@ public class OwnershipGraph {
 
        // we can do a strong update here if one of two cases holds     
        if( f != null &&
+           f != OwnershipAnalysis.getArrayField( f.getType() ) &&
            hrnX.isSingleObject() &&
            (   (hrnX.getNumReferencers() == 1) ||
                ( lnX.getNumReferencees() == 1)
@@ -2650,6 +2651,7 @@ public class OwnershipGraph {
                                                                                  ogCallee,
                                                                                  mc )
                                                                     );
+
          rewriteCallerReachability( bogusIndex,
                                     null,
                                     edgeNewInCallerTemplate,
@@ -4273,7 +4275,6 @@ public class OwnershipGraph {
 
   public Set<HeapRegionNode> findCommonReachableNodes( HeapRegionNode hrn1,
                                                       HeapRegionNode hrn2 ) {
-    //assert hrn1 != hrn2;
 
     Set<HeapRegionNode> reachableNodes1 = new HashSet<HeapRegionNode>();
     Set<HeapRegionNode> reachableNodes2 = new HashSet<HeapRegionNode>();
index 120996140aaa5b131316e63b931fb6afb3abf41d..b5245e7e5fc37d87add9e41c309bd10c0223fc54 100644 (file)
@@ -1,7 +1,7 @@
 MAIN_CLASS=small #smalltest
 
 PROGRAM=test
-SOURCE_FILES=small.java #smalltest.java
+SOURCE_FILES=smaller.java #smalltest.java
 
 BUILDSCRIPT=~/research/Robust/src/buildscript
 BSFLAGS= -debug -nooptimize -mainclass $(MAIN_CLASS) -justanalyze -ownership -ownallocdepth 1 -ownwritedots final -ownaliasfile aliases.txt -enable-assertions