// keep the field ownership from the linear type checking
Hashtable<MethodDescriptor, Set<FieldDescriptor>> mapMethodToOwnedFieldSet;
-
+
Set<FlatNode> sameHeightWriteFlatNodeSet;
CallGraph callgraph;
private LinkedList<MethodDescriptor> sortedDescriptors;
+ private Map<Location, Set<Descriptor>> mapSharedLocToDescSet;
+
public SSJavaAnalysis(State state, TypeUtil tu, BuildFlat bf, CallGraph callgraph) {
this.state = state;
this.tu = tu;
this.mapDescriptorToSetDependents = new Hashtable<Descriptor, Set<MethodDescriptor>>();
this.sortedDescriptors = new LinkedList<MethodDescriptor>();
this.md2pcLoc = new HashMap<MethodDescriptor, CompositeLocation>();
+ this.mapSharedLocToDescSet = new HashMap<Location, Set<Descriptor>>();
}
public void doCheck() {
return (LinkedList<MethodDescriptor>) sortedDescriptors.clone();
}
+ public void addSharedDesc(Location loc, Descriptor fd) {
+ if (!mapSharedLocToDescSet.containsKey(loc)) {
+ mapSharedLocToDescSet.put(loc, new HashSet<Descriptor>());
+ }
+ mapSharedLocToDescSet.get(loc).add(fd);
+ }
+
+ public Set<Descriptor> getSharedDescSet(Location loc) {
+ return mapSharedLocToDescSet.get(loc);
+ }
+
private void inference() {
LocationInference inferEngine = new LocationInference(this, state);
inferEngine.inference();