#ifndef __CYCLEGRAPH_H__
#define __CYCLEGRAPH_H__
-#include <vector>
+#include "stl_wrappers.h"
#include <inttypes.h>
#include <stdio.h>
class CycleNode;
class ModelAction;
-typedef std::vector< const Promise *, ModelAlloc<const Promise *> > promise_list_t;
+typedef model_vector< const Promise * > promise_list_t;
/** @brief A graph of Model Actions for tracking cycles. */
class CycleGraph {
void dot_print_edge(FILE *file, const T *from, const U *to, const char *prop);
#endif
- bool resolvePromise(const Promise *promise, ModelAction *writer,
- promise_list_t *mustResolve);
+ bool resolvePromise(const Promise *promise, ModelAction *writer);
SNAPSHOTALLOC
private:
CycleNode * getNode(const Promise *promise);
CycleNode * getNode_noCreate(const ModelAction *act) const;
CycleNode * getNode_noCreate(const Promise *promise) const;
- bool mergeNodes(CycleNode *node1, CycleNode *node2,
- promise_list_t *mustMerge);
+ bool mergeNodes(CycleNode *node1, CycleNode *node2);
HashTable<const CycleNode *, const CycleNode *, uintptr_t, 4, model_malloc, model_calloc, model_free> *discovered;
+ model_vector< const CycleNode * > * queue;
+
/** @brief A table for mapping ModelActions to CycleNodes */
HashTable<const ModelAction *, CycleNode *, uintptr_t, 4> actionToNode;