|
Ninja
|
An edge in the dependency graph; links between Nodes using Rules. More...
#include <graph.h>
Public Types | |
| enum | VisitMark { VisitNone, VisitInStack, VisitDone } |
Public Member Functions | |
| bool | AllInputsReady () const |
| Return true if all inputs' in-edges are ready. More... | |
| void | Dump (const char *prefix="") const |
| Edge () | |
| string | EvaluateCommand (bool incl_rsp_file=false) |
| Expand all variables in a command and return it as a string. More... | |
| string | GetBinding (const string &key) |
| Returns the shell-escaped value of |key|. More... | |
| bool | GetBindingBool (const string &key) |
| string | GetUnescapedDepfile () |
| Like GetBinding("depfile"), but without shell escaping. More... | |
| string | GetUnescapedRspfile () |
| Like GetBinding("rspfile"), but without shell escaping. More... | |
| bool | is_implicit (size_t index) |
| bool | is_implicit_out (size_t index) const |
| bool | is_order_only (size_t index) |
| bool | is_phony () const |
| bool | maybe_phonycycle_diagnostic () const |
| bool | outputs_ready () const |
| Pool * | pool () const |
| const Rule & | rule () const |
| bool | use_console () const |
| int | weight () const |
Public Attributes | |
| bool | deps_missing_ |
| BindingEnv * | env_ |
| int | implicit_deps_ |
| int | implicit_outs_ |
| vector< Node * > | inputs_ |
| VisitMark | mark_ |
| int | order_only_deps_ |
| vector< Node * > | outputs_ |
| bool | outputs_ready_ |
| Pool * | pool_ |
| const Rule * | rule_ |
An edge in the dependency graph; links between Nodes using Rules.
| enum Edge::VisitMark |
| bool Edge::AllInputsReady | ( | ) | const |
Return true if all inputs' in-edges are ready.
Definition at line 275 of file graph.cc.
References inputs_.
Referenced by Plan::AddSubTarget().
| void Edge::Dump | ( | const char * | prefix = "" | ) | const |
Definition at line 391 of file graph.cc.
References inputs_, Pool::name(), Rule::name(), outputs_, pool_, and rule_.
Referenced by Node::Dump().
| string Edge::EvaluateCommand | ( | bool | incl_rsp_file = false | ) |
Expand all variables in a command and return it as a string.
If incl_rsp_file is enabled, the string will also contain the full contents of a response file (if applicable)
Definition at line 362 of file graph.cc.
References GetBinding().
Referenced by BuildStatus::BuildEdgeFinished(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), RealCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
| string Edge::GetBinding | ( | const string & | key | ) |
Returns the shell-escaped value of |key|.
Definition at line 372 of file graph.cc.
References EdgeEnv::kShellEscape, and EdgeEnv::LookupVariable().
Referenced by EvaluateCommand(), Builder::FinishCommand(), GetBindingBool(), DepsLog::IsDepsEntryLiveFor(), ImplicitDepLoader::LoadDeps(), ManifestParser::ParseEdge(), BuildStatus::PrintStatus(), Builder::StartEdge(), and TEST_F().
| bool Edge::GetBindingBool | ( | const string & | key | ) |
Definition at line 377 of file graph.cc.
References GetBinding().
Referenced by Builder::FinishCommand(), and DependencyScan::RecomputeOutputDirty().
| string Edge::GetUnescapedDepfile | ( | ) |
Like GetBinding("depfile"), but without shell escaping.
Definition at line 381 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::ExtractDeps(), Builder::FinishCommand(), ImplicitDepLoader::LoadDeps(), and Cleaner::RemoveEdgeFiles().
| string Edge::GetUnescapedRspfile | ( | ) |
Like GetBinding("rspfile"), but without shell escaping.
Definition at line 386 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::FinishCommand(), Cleaner::RemoveEdgeFiles(), and Builder::StartEdge().
|
inline |
|
inline |
|
inline |
Definition at line 189 of file graph.h.
Referenced by GraphViz::AddTarget(), DependencyScan::RecomputeDirty(), and TEST_F().
| bool Edge::is_phony | ( | ) | const |
Definition at line 412 of file graph.cc.
References State::kPhonyRule, and rule_.
Referenced by Plan::AddSubTarget(), Builder::Build(), maybe_phonycycle_diagnostic(), DependencyScan::RecomputeDirty(), DependencyScan::RecomputeOutputDirty(), and Builder::StartEdge().
| bool Edge::maybe_phonycycle_diagnostic | ( | ) | const |
Definition at line 420 of file graph.cc.
References implicit_deps_, implicit_outs_, is_phony(), and outputs_.
Referenced by ManifestParser::ParseEdge(), and DependencyScan::VerifyDAG().
|
inline |
Definition at line 173 of file graph.h.
Referenced by Plan::AddSubTarget().
|
inline |
Definition at line 171 of file graph.h.
Referenced by Plan::EdgeFinished(), Plan::ScheduleWork(), and use_console().
|
inline |
Definition at line 170 of file graph.h.
Referenced by FakeCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
| bool Edge::use_console | ( | ) | const |
Definition at line 416 of file graph.cc.
References State::kConsolePool, and pool().
Referenced by BuildStatus::BuildEdgeFinished(), BuildStatus::BuildEdgeStarted(), RealCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
|
inline |
Definition at line 172 of file graph.h.
Referenced by Pool::EdgeFinished(), Pool::EdgeScheduled(), Pool::RetrieveReadyEdges(), and Pool::WeightedEdgeCmp().
| bool Edge::deps_missing_ |
Definition at line 168 of file graph.h.
Referenced by DependencyScan::RecomputeDirty().
| BindingEnv* Edge::env_ |
Definition at line 165 of file graph.h.
Referenced by State::AddEdge(), EdgeEnv::LookupVariable(), and ManifestParser::ParseEdge().
| int Edge::implicit_deps_ |
Definition at line 183 of file graph.h.
Referenced by EdgeEnv::LookupVariable(), maybe_phonycycle_diagnostic(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), and TEST_F().
| int Edge::implicit_outs_ |
Definition at line 198 of file graph.h.
Referenced by EdgeEnv::LookupVariable(), maybe_phonycycle_diagnostic(), ManifestParser::ParseEdge(), and TEST_F().
| vector<Node*> Edge::inputs_ |
Definition at line 163 of file graph.h.
Referenced by State::AddIn(), Plan::AddSubTarget(), GraphViz::AddTarget(), AllInputsReady(), Dump(), Builder::FinishCommand(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), DependencyScan::RecomputeDirty(), DependencyScan::RecomputeOutputDirty(), and TEST_F().
| VisitMark Edge::mark_ |
Definition at line 166 of file graph.h.
Referenced by DependencyScan::RecomputeDirty(), and DependencyScan::VerifyDAG().
| int Edge::order_only_deps_ |
Definition at line 184 of file graph.h.
Referenced by Builder::FinishCommand(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), and TEST_F().
| vector<Node*> Edge::outputs_ |
Definition at line 164 of file graph.h.
Referenced by State::AddOut(), GraphViz::AddTarget(), BuildStatus::BuildEdgeFinished(), ImplicitDepLoader::CreatePhonyInEdge(), Dump(), Plan::EdgeFinished(), PlanTest::FindWorkSorted(), Builder::FinishCommand(), ImplicitDepLoader::LoadDepFile(), ImplicitDepLoader::LoadDepsFromLog(), EdgeEnv::LookupVariable(), maybe_phonycycle_diagnostic(), ManifestParser::ParseEdge(), DependencyScan::RecomputeDirty(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
| bool Edge::outputs_ready_ |
Definition at line 167 of file graph.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), and DependencyScan::RecomputeDirty().
| Pool* Edge::pool_ |
Definition at line 162 of file graph.h.
Referenced by State::AddEdge(), Dump(), and ManifestParser::ParseEdge().
| const Rule* Edge::rule_ |
Definition at line 161 of file graph.h.
Referenced by State::AddEdge(), GraphViz::AddTarget(), Dump(), is_phony(), and EdgeEnv::LookupVariable().
1.8.14