action: print promise number, not just ?
[c11tester.git] / cyclegraph.h
index e96e1216c0907a0af9d7e166441f960c5b782188..1af54c77818bde954d784eb925cc56adc2013fd4 100644 (file)
@@ -36,8 +36,8 @@ class CycleGraph {
        bool checkForCycles() const;
        bool checkPromise(const ModelAction *from, Promise *p) const;
 
-       template <typename T>
-       bool checkReachable(const ModelAction *from, const T *to) const;
+       template <typename T, typename U>
+       bool checkReachable(const T *from, const U *to) const;
 
        void startChanges();
        void commitChanges();
@@ -47,7 +47,7 @@ class CycleGraph {
        void dumpGraphToFile(const char *filename) const;
 #endif
 
-       bool resolvePromise(ModelAction *reader, ModelAction *writer,
+       bool resolvePromise(const Promise *promise, ModelAction *writer,
                        promise_list_t *mustResolve);
 
        SNAPSHOTALLOC
@@ -67,9 +67,8 @@ class CycleGraph {
 
        /** @brief A table for mapping ModelActions to CycleNodes */
        HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;
-       /** @brief A table for mapping reader ModelActions to Promise
-        *  CycleNodes */
-       HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> readerToPromiseNode;
+       /** @brief A table for mapping Promises to CycleNodes */
+       HashTable<const Promise *, CycleNode *, uintptr_t, 4> promiseToNode;
 
 #if SUPPORT_MOD_ORDER_DUMP
        std::vector<CycleNode *> nodeList;