diff options
author | Brad King <brad.king@kitware.com> | 2015-11-12 16:24:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-06-19 15:08:26 (GMT) |
commit | a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab (patch) | |
tree | f7f9cdc4b8d9660b9b58a5964c61dddbfc0e8492 /src/graph.h | |
parent | afe3beb980a4780caecc12d3fc919feb3f9cce42 (diff) | |
download | Ninja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.zip Ninja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.tar.gz Ninja-a8b5cdc4e9034f8823ee0cfa94ea49d7795698ab.tar.bz2 |
Add infrastructure for efficient walks through the `Edge` graph
Store a mark in each `Edge` to be updated as it is encountered by a walk.
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h index 9e82ca2..1b30dee 100644 --- a/src/graph.h +++ b/src/graph.h @@ -128,7 +128,13 @@ private: /// An edge in the dependency graph; links between Nodes using Rules. struct Edge { - Edge() : rule_(NULL), pool_(NULL), env_(NULL), + enum VisitMark { + VisitNone, + VisitInStack, + VisitDone + }; + + Edge() : rule_(NULL), pool_(NULL), env_(NULL), mark_(VisitNone), outputs_ready_(false), deps_missing_(false), implicit_deps_(0), order_only_deps_(0), implicit_outs_(0) {} @@ -156,6 +162,7 @@ struct Edge { vector<Node*> inputs_; vector<Node*> outputs_; BindingEnv* env_; + VisitMark mark_; bool outputs_ready_; bool deps_missing_; |