From d73da907e7eb2785fdbfd061ac7e3dd438aad155 Mon Sep 17 00:00:00 2001 From: jjenista Date: Thu, 3 Feb 2011 23:07:40 +0000 Subject: [PATCH] fixing bugs from task code cleanup --- .../src/Analysis/OoOJava/OoOJavaAnalysis.java | 23 ++++++------------- Robust/src/IR/Flat/BuildOoOJavaCode.java | 13 +++-------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java index e7abf1b8..11d645e8 100644 --- a/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java +++ b/Robust/src/Analysis/OoOJava/OoOJavaAnalysis.java @@ -140,6 +140,8 @@ public class OoOJavaAnalysis { sese2conflictGraph = new Hashtable(); conflictGraph2SESELock = new Hashtable>(); fn2contextTaskNames = new Hashtable(); + fn2fm = new Hashtable(); + // 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 flatNodesToVisit = new HashSet(); - flatNodesToVisit.add( fm.getFlatExit() ); + flatNodesToVisit.add( fm ); Set flatNodesVisited = new HashSet(); @@ -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 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; diff --git a/Robust/src/IR/Flat/BuildOoOJavaCode.java b/Robust/src/IR/Flat/BuildOoOJavaCode.java index a8d73348..a277d40a 100644 --- a/Robust/src/IR/Flat/BuildOoOJavaCode.java +++ b/Robust/src/IR/Flat/BuildOoOJavaCode.java @@ -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 pItr = contextTaskNames.getNeededStaticNames().iterator(); while( pItr.hasNext() ) { -- 2.34.1