fixing bugs from task code cleanup
authorjjenista <jjenista>
Thu, 3 Feb 2011 23:07:40 +0000 (23:07 +0000)
committerjjenista <jjenista>
Thu, 3 Feb 2011 23:07:40 +0000 (23:07 +0000)
Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java
Robust/src/IR/Flat/BuildOoOJavaCode.java

index e7abf1b87f69e84c7d360e0d77ee84decf184cfe..11d645e8e504fdf579224d2a283ebc159e97d484 100644 (file)
@@ -140,6 +140,8 @@ public class OoOJavaAnalysis {
     sese2conflictGraph     = new Hashtable<FlatNode, ConflictGraph>();
     conflictGraph2SESELock = new Hashtable<ConflictGraph, HashSet<SESELock>>();
     fn2contextTaskNames    = new Hashtable<FlatNode, ContextTaskNames>();
+    fn2fm                  = new Hashtable<FlatNode, FlatMethod>();
+
 
     // add all methods transitively reachable from the
     // source's main to set for analysis
@@ -268,21 +270,12 @@ public class OoOJavaAnalysis {
       } catch (IOException e) {}
     }
     
-
-    System.out.println("\n\n\n##########################################################\n"+
-                       "Warning, lots of code changes going on, OoOJava and RCR/DFJ\n"+
-                       "systems are being cleaned up.  Until the analyses and code gen\n"+
-                       "are fully altered and coordinated, these systems will not run\n"+
-                       "to completion.  Partial stable check-ins are necessary to manage\n"+
-                       "the number of files getting touched.\n"+
-                       "##########################################################" );
-    System.exit( 0 );
   }
 
 
   private void buildFlatNodeToFlatMethod( FlatMethod fm ) {
     Set<FlatNode> flatNodesToVisit = new HashSet<FlatNode>();
-    flatNodesToVisit.add( fm.getFlatExit() );
+    flatNodesToVisit.add( fm );
 
     Set<FlatNode> flatNodesVisited = new HashSet<FlatNode>();
 
@@ -1118,9 +1111,7 @@ public class OoOJavaAnalysis {
       EffectsAnalysis effectsAnalysis = disjointAnalysisTaints.getEffectsAnalysis();
       ConflictGraph conflictGraph = sese2conflictGraph.get( parent );
       assert conflictGraph == null;
-      //if (conflictGraph == null) {
       conflictGraph = new ConflictGraph( state );
-      //}
 
       Set<FlatSESEEnterNode> children = parent.getChildren();
       for( Iterator iterator2 = children.iterator(); iterator2.hasNext(); ) {
@@ -1188,10 +1179,10 @@ public class OoOJavaAnalysis {
       FlatSESEEnterNode currentSESE = seseItr.next();
 
       ConflictGraph conflictGraph = sese2conflictGraph.get( currentSESE );
-      assert conflictGraph != null;
-      //if (conflictGraph == null) {
-      //  conflictGraph = new ConflictGraph(state);
-      //}
+      if( conflictGraph == null ) {
+        assert currentSESE.getIsLeafSESE();
+        continue;
+      }
 
       TempDescriptor lhs;
       TempDescriptor rhs;
index a8d7334842f7ba10732ce53243e93a8ef7ca31b6..a277d40a7442b7f61a8cd49ac419b4cc664fee1a 100644 (file)
@@ -1337,10 +1337,10 @@ public class BuildOoOJavaCode extends BuildCode {
       // and also release references that have become too old
       if( !fsen.getIsMainSESE() ) {
 
-        FlatSESEEnterNode currentSESE = fsen.getLocalParent();
+        FlatSESEEnterNode currentSESE = fsen.getLocalParent();        
 
         ContextTaskNames contextTaskNames;
-        if( currentSESE.getIsCallerProxySESE() ) {
+        if( currentSESE == null ) {
           contextTaskNames = oooa.getContextTaskNames( oooa.getContainingFlatMethod( fsen ) );
         } else {
           contextTaskNames = oooa.getContextTaskNames( currentSESE );
@@ -1817,14 +1817,7 @@ public class BuildOoOJavaCode extends BuildCode {
     output.println("   // releasing static SESEs");
     output.println("#ifndef OOO_DISABLE_TASKMEMPOOL" );
 
-    FlatSESEEnterNode currentSESE = fsen.getLocalParent();
-
-    ContextTaskNames contextTaskNames;
-    if( currentSESE.getIsCallerProxySESE() ) {
-      contextTaskNames = oooa.getContextTaskNames( oooa.getContainingFlatMethod( fsen ) );
-    } else {
-      contextTaskNames = oooa.getContextTaskNames( currentSESE );
-    }
+    ContextTaskNames contextTaskNames = oooa.getContextTaskNames( fsen );
 
     Iterator<SESEandAgePair> pItr = contextTaskNames.getNeededStaticNames().iterator();
     while( pItr.hasNext() ) {