From: jjenista Date: Mon, 23 Mar 2009 19:57:58 +0000 (+0000) Subject: don't do strong updates on array element references X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5ed26f5295ed206abd65b6869fae9a7617b08d8c;p=IRC.git don't do strong updates on array element references --- diff --git a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java index b0733de9..004d192d 100644 --- a/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java +++ b/Robust/src/Analysis/OwnershipAnalysis/OwnershipGraph.java @@ -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 findCommonReachableNodes( HeapRegionNode hrn1, HeapRegionNode hrn2 ) { - //assert hrn1 != hrn2; Set reachableNodes1 = new HashSet(); Set reachableNodes2 = new HashSet(); diff --git a/Robust/src/Tests/OwnershipAnalysisTest/smalltest/makefile b/Robust/src/Tests/OwnershipAnalysisTest/smalltest/makefile index 12099614..b5245e7e 100644 --- a/Robust/src/Tests/OwnershipAnalysisTest/smalltest/makefile +++ b/Robust/src/Tests/OwnershipAnalysisTest/smalltest/makefile @@ -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