|
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 () | |
| 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_ |
| 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_ |
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 316 of file graph.cc.
Referenced by Plan::AddSubTarget(), and Plan::EdgeMaybeReady().
| 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 401 of file graph.cc.
Referenced by BuildStatus::BuildEdgeFinished(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), RealCommandRunner::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 411 of file graph.cc.
References EdgeEnv::kShellEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::FinishCommand(), DepsLog::IsDepsEntryLiveFor(), ImplicitDepLoader::LoadDeps(), ManifestParser::ParseEdge(), BuildStatus::PrintStatus(), Builder::StartEdge(), TEST_F(), and FakeCommandRunner::WaitForCommand().
| bool Edge::GetBindingBool | ( | const std::string & | key | ) | const |
Definition at line 416 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 420 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::ExtractDeps(), Builder::FinishCommand(), ImplicitDepLoader::LoadDeps(), and Cleaner::RemoveEdgeFiles().
| string Edge::GetUnescapedDyndep | ( | ) | const |
Like GetBinding("dyndep"), but without shell escaping.
Definition at line 425 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 430 of file graph.cc.
References EdgeEnv::kDoNotEscape, and EdgeEnv::LookupVariable().
Referenced by Builder::FinishCommand(), Cleaner::RemoveEdgeFiles(), and Builder::StartEdge().
|
inline |
Definition at line 198 of file graph.h.
References implicit_deps_, inputs_, is_order_only(), and order_only_deps_.
Referenced by TEST_F().
|
inline |
Definition at line 212 of file graph.h.
References implicit_outs_, and outputs_.
Referenced by TEST_F().
|
inline |
Definition at line 202 of file graph.h.
References inputs_, and order_only_deps_.
Referenced by GraphViz::AddTarget(), is_implicit(), and TEST_F().
| bool Edge::is_phony | ( | ) | const |
Definition at line 456 of file graph.cc.
References State::kPhonyRule.
Referenced by Builder::Build(), Plan::EdgeWanted(), DependencyScan::RecomputeOutputDirty(), and Builder::StartEdge().
| bool Edge::maybe_phonycycle_diagnostic | ( | ) | const |
Definition at line 464 of file graph.cc.
Referenced by ManifestParser::ParseEdge(), and DependencyScan::VerifyDAG().
|
inline |
Definition at line 186 of file graph.h.
References outputs_ready_.
Referenced by Plan::AddSubTarget(), Plan::DyndepsLoaded(), and Plan::RefreshDyndepDependents().
|
inline |
Definition at line 184 of file graph.h.
References pool_.
Referenced by Plan::EdgeFinished(), and Plan::ScheduleWork().
|
inline |
Definition at line 183 of file graph.h.
References rule_.
Referenced by FakeCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
| bool Edge::use_console | ( | ) | const |
Definition at line 460 of file graph.cc.
References State::kConsolePool.
Referenced by BuildStatus::BuildEdgeFinished(), BuildStatus::BuildEdgeStarted(), RealCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
|
inline |
Definition at line 185 of file graph.h.
Referenced by Pool::EdgeFinished(), Pool::EdgeScheduled(), Pool::RetrieveReadyEdges(), and Pool::WeightedEdgeCmp().
| Node* Edge::dyndep_ |
Definition at line 176 of file graph.h.
Referenced by GraphViz::AddTarget(), DyndepLoader::LoadDyndeps(), ManifestParser::ParseEdge(), and TEST_F().
| BindingEnv* Edge::env_ |
Definition at line 177 of file graph.h.
Referenced by State::AddEdge(), ManifestParser::ParseEdge(), and DyndepLoader::UpdateEdge().
| int Edge::implicit_deps_ |
Definition at line 196 of file graph.h.
Referenced by is_implicit(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), TEST_F(), and DyndepLoader::UpdateEdge().
| int Edge::implicit_outs_ |
Definition at line 211 of file graph.h.
Referenced by is_implicit_out(), ManifestParser::ParseEdge(), TEST_F(), and DyndepLoader::UpdateEdge().
| std::vector<Node*> Edge::inputs_ |
Definition at line 174 of file graph.h.
Referenced by State::AddIn(), Plan::AddSubTarget(), GraphViz::AddTarget(), Builder::FinishCommand(), is_implicit(), is_order_only(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), DependencyScan::RecomputeOutputDirty(), FakeCommandRunner::StartCommand(), TEST_F(), DyndepLoader::UpdateEdge(), and FakeCommandRunner::WaitForCommand().
| VisitMark Edge::mark_ |
Definition at line 178 of file graph.h.
Referenced by Plan::UnmarkDependents(), and DependencyScan::VerifyDAG().
| int Edge::order_only_deps_ |
Definition at line 197 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 175 of file graph.h.
Referenced by State::AddOut(), GraphViz::AddTarget(), BuildStatus::BuildEdgeFinished(), CompareEdgesByOutput::cmp(), ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), Builder::FinishCommand(), is_implicit_out(), ImplicitDepLoader::LoadDepFile(), ImplicitDepLoader::LoadDepsFromLog(), DyndepLoader::LoadDyndeps(), ManifestParser::ParseEdge(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), TEST_F(), Plan::UnmarkDependents(), and DyndepLoader::UpdateEdge().
| bool Edge::outputs_ready_ |
Definition at line 179 of file graph.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), and outputs_ready().
| Pool* Edge::pool_ |
Definition at line 173 of file graph.h.
Referenced by State::AddEdge(), ManifestParser::ParseEdge(), and pool().
| const Rule* Edge::rule_ |
Definition at line 172 of file graph.h.
Referenced by State::AddEdge(), GraphViz::AddTarget(), and rule().
1.8.14