|
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 | CollectInputs (bool shell_escape, std::vector< std::string > *out) const |
| void | Dump (const char *prefix="") const |
| Edge () | |
| std::string | EvaluateCommand (bool incl_rsp_file=false) const |
| Expand all variables in a command and return it as a string. More... | |
| std::string | GetBinding (const std::string &key) const |
| Returns the shell-escaped value of |key|. More... | |
| bool | GetBindingBool (const std::string &key) const |
| std::string | GetUnescapedDepfile () const |
| Like GetBinding("depfile"), but without shell escaping. More... | |
| std::string | GetUnescapedDyndep () const |
| Like GetBinding("dyndep"), but without shell escaping. More... | |
| std::string | GetUnescapedRspfile () const |
| 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_loaded_ |
| bool | deps_missing_ |
| Node * | dyndep_ |
| BindingEnv * | env_ |
| bool | generated_by_dep_loader_ |
| size_t | id_ |
| int | implicit_deps_ |
| int | implicit_outs_ |
| std::vector< Node * > | inputs_ |
| VisitMark | mark_ |
| int | order_only_deps_ |
| std::vector< Node * > | outputs_ |
| bool | outputs_ready_ |
| Pool * | pool_ |
| const Rule * | rule_ |
| std::vector< Node * > | validations_ |
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 374 of file graph.cc.
Referenced by Plan::AddSubTarget(), and Plan::EdgeMaybeReady().
| void Edge::CollectInputs | ( | bool | shell_escape, |
| std::vector< std::string > * | out | ||
| ) | const |
Definition at line 459 of file graph.cc.
References GetShellEscapedString(), and GetWin32EscapedString().
Referenced by TEST_F().
| std::string Edge::EvaluateCommand | ( | bool | incl_rsp_file = false | ) | const |
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 481 of file graph.cc.
Referenced by StatusPrinter::BuildEdgeFinished(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), RealCommandRunner::StartCommand(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
| std::string Edge::GetBinding | ( | const std::string & | key | ) | const |
Returns the shell-escaped value of |key|.
Definition at line 491 of file graph.cc.
References EdgeEnv::kShellEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::FinishCommand(), DepsLog::IsDepsEntryLiveFor(), ImplicitDepLoader::LoadDeps(), ManifestParser::ParseEdge(), StatusPrinter::PrintStatus(), MissingDependencyScanner::ProcessNode(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), TEST_F(), and FakeCommandRunner::WaitForCommand().
| bool Edge::GetBindingBool | ( | const std::string & | key | ) | const |
Definition at line 496 of file graph.cc.
Referenced by Builder::Build(), Builder::FinishCommand(), DependencyScan::RecomputeOutputDirty(), and TEST_F().
| string Edge::GetUnescapedDepfile | ( | ) | const |
Like GetBinding("depfile"), but without shell escaping.
Definition at line 500 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::ExtractDeps(), Builder::FinishCommand(), ImplicitDepLoader::LoadDeps(), Cleaner::RemoveEdgeFiles(), and FakeCommandRunner::StartCommand().
| string Edge::GetUnescapedDyndep | ( | ) | const |
Like GetBinding("dyndep"), but without shell escaping.
Definition at line 505 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by ManifestParser::ParseEdge().
| std::string Edge::GetUnescapedRspfile | ( | ) | const |
Like GetBinding("rspfile"), but without shell escaping.
Definition at line 510 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::FinishCommand(), Cleaner::RemoveEdgeFiles(), and Builder::StartEdge().
|
inline |
Definition at line 230 of file graph.h.
References implicit_deps_, inputs_, is_order_only(), and order_only_deps_.
Referenced by TEST_F().
|
inline |
Definition at line 244 of file graph.h.
References implicit_outs_, and outputs_.
Referenced by TEST_F().
|
inline |
Definition at line 234 of file graph.h.
References inputs_, and order_only_deps_.
Referenced by GraphViz::AddTarget(), is_implicit(), DependencyScan::RecomputeNodeDirty(), and TEST_F().
| bool Edge::is_phony | ( | ) | const |
Definition at line 543 of file graph.cc.
References State::kPhonyRule.
Referenced by Builder::Build(), Plan::EdgeWanted(), DependencyScan::RecomputeNodeDirty(), DependencyScan::RecomputeOutputDirty(), and Builder::StartEdge().
| bool Edge::maybe_phonycycle_diagnostic | ( | ) | const |
Definition at line 551 of file graph.cc.
Referenced by ManifestParser::ParseEdge(), and DependencyScan::VerifyDAG().
|
inline |
Definition at line 218 of file graph.h.
References outputs_ready_.
Referenced by Plan::AddSubTarget(), Plan::DyndepsLoaded(), DependencyScan::RecomputeNodeDirty(), and Plan::RefreshDyndepDependents().
|
inline |
Definition at line 216 of file graph.h.
References pool_.
Referenced by Plan::EdgeFinished(), and Plan::ScheduleWork().
|
inline |
Definition at line 215 of file graph.h.
References rule_.
Referenced by FakeCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
| bool Edge::use_console | ( | ) | const |
Definition at line 547 of file graph.cc.
References State::kConsolePool.
Referenced by StatusPrinter::BuildEdgeFinished(), StatusPrinter::BuildEdgeStarted(), RealCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
|
inline |
Definition at line 217 of file graph.h.
Referenced by Pool::EdgeFinished(), Pool::EdgeScheduled(), Pool::WeightedEdgeCmp::operator()(), and Pool::RetrieveReadyEdges().
| bool Edge::deps_loaded_ |
Definition at line 211 of file graph.h.
Referenced by DependencyScan::RecomputeNodeDirty().
| bool Edge::deps_missing_ |
Definition at line 212 of file graph.h.
Referenced by DependencyScan::RecomputeNodeDirty().
| Node* Edge::dyndep_ |
Definition at line 206 of file graph.h.
Referenced by GraphViz::AddTarget(), DyndepLoader::LoadDyndeps(), ManifestParser::ParseEdge(), DependencyScan::RecomputeNodeDirty(), and TEST_F().
| BindingEnv* Edge::env_ |
Definition at line 207 of file graph.h.
Referenced by State::AddEdge(), ManifestParser::ParseEdge(), and DyndepLoader::UpdateEdge().
| bool Edge::generated_by_dep_loader_ |
Definition at line 213 of file graph.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge().
| size_t Edge::id_ |
Definition at line 209 of file graph.h.
Referenced by State::AddEdge(), and EdgeCmp::operator()().
| int Edge::implicit_deps_ |
Definition at line 228 of file graph.h.
Referenced by is_implicit(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), TEST_F(), and DyndepLoader::UpdateEdge().
| int Edge::implicit_outs_ |
Definition at line 243 of file graph.h.
Referenced by is_implicit_out(), ManifestParser::ParseEdge(), TEST_F(), and DyndepLoader::UpdateEdge().
| std::vector<Node*> Edge::inputs_ |
Definition at line 203 of file graph.h.
Referenced by State::AddIn(), Plan::AddSubTarget(), GraphViz::AddTarget(), Builder::FinishCommand(), is_implicit(), is_order_only(), ManifestParser::ParseEdge(), MissingDependencyScanner::PathExistsBetween(), ImplicitDepLoader::PreallocateSpace(), MissingDependencyScanner::ProcessNode(), DependencyScan::RecomputeNodeDirty(), DependencyScan::RecomputeOutputDirty(), FakeCommandRunner::StartCommand(), TEST_F(), DyndepLoader::UpdateEdge(), and FakeCommandRunner::WaitForCommand().
| VisitMark Edge::mark_ |
Definition at line 208 of file graph.h.
Referenced by DependencyScan::RecomputeNodeDirty(), Plan::UnmarkDependents(), and DependencyScan::VerifyDAG().
| int Edge::order_only_deps_ |
Definition at line 229 of file graph.h.
Referenced by Builder::FinishCommand(), is_implicit(), is_order_only(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), TEST_F(), and DyndepLoader::UpdateEdge().
| std::vector<Node*> Edge::outputs_ |
Definition at line 204 of file graph.h.
Referenced by State::AddOut(), GraphViz::AddTarget(), StatusPrinter::BuildEdgeFinished(), CompareEdgesByOutput::cmp(), ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), Builder::FinishCommand(), is_implicit_out(), ImplicitDepLoader::LoadDepFile(), ImplicitDepLoader::LoadDepsFromLog(), DyndepLoader::LoadDyndeps(), ManifestParser::ParseEdge(), DependencyScan::RecomputeNodeDirty(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), TEST_F(), Plan::UnmarkDependents(), and DyndepLoader::UpdateEdge().
| bool Edge::outputs_ready_ |
Definition at line 210 of file graph.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), outputs_ready(), and DependencyScan::RecomputeNodeDirty().
| Pool* Edge::pool_ |
Definition at line 202 of file graph.h.
Referenced by State::AddEdge(), ManifestParser::ParseEdge(), and pool().
| const Rule* Edge::rule_ |
Definition at line 201 of file graph.h.
Referenced by State::AddEdge(), GraphViz::AddTarget(), and rule().
| std::vector<Node*> Edge::validations_ |
Definition at line 205 of file graph.h.
Referenced by State::AddValidation(), ManifestParser::ParseEdge(), DependencyScan::RecomputeNodeDirty(), and TEST_F().
1.8.14