projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
49fa81c
)
more changes.
author
yeom
<yeom>
Thu, 29 Oct 2009 01:26:54 +0000
(
01:26
+0000)
committer
yeom
<yeom>
Thu, 29 Oct 2009 01:26:54 +0000
(
01:26
+0000)
Robust/src/Analysis/MLP/StallSite.java
patch
|
blob
|
history
diff --git
a/Robust/src/Analysis/MLP/StallSite.java
b/Robust/src/Analysis/MLP/StallSite.java
index edb794d9e3b4c3265d08ba978fce78ef3cea71cf..beb1b65e8098819c62c85accc1d2ede166d12a09 100644
(file)
--- a/
Robust/src/Analysis/MLP/StallSite.java
+++ b/
Robust/src/Analysis/MLP/StallSite.java
@@
-1,7
+1,10
@@
package Analysis.MLP;
import java.util.HashSet;
package Analysis.MLP;
import java.util.HashSet;
+import java.util.Iterator;
+import Analysis.OwnershipAnalysis.AllocationSite;
+import Analysis.OwnershipAnalysis.HeapRegionNode;
import Analysis.OwnershipAnalysis.ReachabilitySet;
public class StallSite {
import Analysis.OwnershipAnalysis.ReachabilitySet;
public class StallSite {
@@
-10,21
+13,46
@@
public class StallSite {
public static final Integer WRITE_EFFECT = new Integer(2);
private HashSet<Effect> effectSet;
public static final Integer WRITE_EFFECT = new Integer(2);
private HashSet<Effect> effectSet;
- private HashSet<Integer> hrnIDSet;
+ private HashSet<HeapRegionNode> hrnSet;
+ private HashSet<AllocationSite> allocationSiteSet;
private ReachabilitySet rechabilitySet;
public StallSite() {
effectSet = new HashSet<Effect>();
private ReachabilitySet rechabilitySet;
public StallSite() {
effectSet = new HashSet<Effect>();
- hrn
IDSet = new HashSet<Integer
>();
+ hrn
Set = new HashSet<HeapRegionNode
>();
rechabilitySet = new ReachabilitySet();
rechabilitySet = new ReachabilitySet();
+ allocationSiteSet=new HashSet<AllocationSite>();
+ }
+
+ public StallSite(HashSet<HeapRegionNode> hrnSet){
+ this();
+ setHeapRegionNodeSet(hrnSet);
+ for (Iterator iterator = hrnSet.iterator(); iterator.hasNext();) {
+ HeapRegionNode heapRegionNode = (HeapRegionNode) iterator.next();
+ setAllocationSite(heapRegionNode.getAllocationSite());
+ }
}
}
- public StallSite(HashSet<Effect> effectSet, HashSet<
Integer> hrnID
Set,
+ public StallSite(HashSet<Effect> effectSet, HashSet<
HeapRegionNode> hrn
Set,
ReachabilitySet rechabilitySet) {
this.effectSet = effectSet;
ReachabilitySet rechabilitySet) {
this.effectSet = effectSet;
- this.hrn
IDSet = hrnID
Set;
+ this.hrn
Set = hrn
Set;
this.rechabilitySet = rechabilitySet;
}
this.rechabilitySet = rechabilitySet;
}
+
+ public void setAllocationSite(AllocationSite allocationSite){
+ if(allocationSite!=null){
+ allocationSiteSet.add(allocationSite);
+ }
+ }
+
+ public void setHeapRegionNodeSet(HashSet<HeapRegionNode> newSet){
+ hrnSet.addAll(newSet);
+ }
+
+ public HashSet<AllocationSite> getAllocationSiteSet(){
+ return allocationSiteSet;
+ }
public void addEffect(String type, String field, Integer effect) {
Effect e = new Effect(type, field, effect);
public void addEffect(String type, String field, Integer effect) {
Effect e = new Effect(type, field, effect);
@@
-35,8
+63,8
@@
public class StallSite {
return effectSet;
}
return effectSet;
}
- public HashSet<
Integer> getHRNID
Set() {
- return hrn
ID
Set;
+ public HashSet<
HeapRegionNode> getHRN
Set() {
+ return hrnSet;
}
public ReachabilitySet getReachabilitySet() {
}
public ReachabilitySet getReachabilitySet() {
@@
-56,7
+84,7
@@
public class StallSite {
StallSite in = (StallSite) o;
if (effectSet.equals(in.getEffectSet())
StallSite in = (StallSite) o;
if (effectSet.equals(in.getEffectSet())
- && hrn
IDSet.equals(in.getHRNID
Set())
+ && hrn
Set.equals(in.getHRN
Set())
&& rechabilitySet.equals(in.getReachabilitySet())) {
return true;
} else {
&& rechabilitySet.equals(in.getReachabilitySet())) {
return true;
} else {
@@
-64,6
+92,12
@@
public class StallSite {
}
}
}
}
+
+ public String toString() {
+ return "StallSite [effectSet=" + effectSet + ", hrnIDSet=" + hrnSet
+ + ", rechabilitySet=" + rechabilitySet + "]";
+ }
+
}
class Effect {
}
class Effect {