changes for proper handling field.
authoryeom <yeom>
Wed, 17 Mar 2010 18:29:36 +0000 (18:29 +0000)
committeryeom <yeom>
Wed, 17 Mar 2010 18:29:36 +0000 (18:29 +0000)
Robust/src/Analysis/Disjoint/DisjointAnalysis.java

index acb410701d41064c435243ffc1b4916b3f544084..688d342a40acdb65dcae0e0013298cb7b5e92d5c 100644 (file)
@@ -1251,7 +1251,7 @@ private ReachGraph createInitialTaskReachGraph(FlatMethod fm) {
        for (Iterator it = classDesc.getFields(); it.hasNext();) {
            FieldDescriptor fd = (FieldDescriptor) it.next();
            TypeDescriptor fieldType = fd.getType();
-           if (!fieldType.isImmutable()) {
+           if (!fieldType.isImmutable() || fieldType.isArray()) {
                HashMap<HeapRegionNode, FieldDescriptor> newMap = new HashMap<HeapRegionNode, FieldDescriptor>();
                newMap.put(hrnNewest, fd);
                workSet.add(newMap);
@@ -1316,7 +1316,8 @@ private ReachGraph createInitialTaskReachGraph(FlatMethod fm) {
                    mapTypeToExistingSummaryNode.put(type, hrnSummary);
                    
                    // set-up a work set for  fields of the class
-                   classDesc = type.getClassDesc();
+                   if(!type.isImmutable()){
+                   classDesc = type.getClassDesc();                
                    for (Iterator it = classDesc.getFields(); it.hasNext();) {
                        FieldDescriptor typeFieldDesc = (FieldDescriptor) it.next();
                        TypeDescriptor fieldType = typeFieldDesc.getType();
@@ -1331,6 +1332,7 @@ private ReachGraph createInitialTaskReachGraph(FlatMethod fm) {
                            }
                        }
                    }
+                   }
                    
                }else{
                    // if there exists corresponding summary node