cyclegraph: bugfix - pop edges properly
authorBrian Norris <banorris@uci.edu>
Tue, 5 Feb 2013 22:26:24 +0000 (14:26 -0800)
committerBrian Norris <banorris@uci.edu>
Wed, 6 Feb 2013 21:45:20 +0000 (13:45 -0800)
Now that CycleNode's have back-edges, we need to properly remove *both*
the forward and back edges when doing roll-back.

cyclegraph.cc
cyclegraph.h

index eaddc8e..e834cb6 100644 (file)
@@ -348,7 +348,7 @@ void CycleGraph::commitChanges()
 void CycleGraph::rollbackChanges()
 {
        for (unsigned int i = 0; i < rollbackvector.size(); i++)
-               rollbackvector[i]->popEdge();
+               rollbackvector[i]->removeEdge();
 
        for (unsigned int i = 0; i < rmwrollbackvector.size(); i++)
                rmwrollbackvector[i]->clearRMW();
index 749abf8..fcb1d30 100644 (file)
@@ -102,11 +102,6 @@ class CycleNode {
        void clearRMW() { hasRMW = NULL; }
        const ModelAction * getAction() const { return action; }
        const Promise * getPromise() const { return promise; }
-
-       void popEdge() {
-               edges.pop_back();
-       }
-
        bool is_promise() const { return !action; }
        void resolvePromise(const ModelAction *writer);