Ninja
Public Member Functions | Private Member Functions | Private Attributes | List of all members
DependencyScan Struct Reference

DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges. More...

#include <graph.h>

Public Member Functions

BuildLogbuild_log () const
 
 DependencyScan (State *state, BuildLog *build_log, DepsLog *deps_log, DiskInterface *disk_interface, DepfileParserOptions const *depfile_parser_options)
 
DepsLogdeps_log () const
 
bool RecomputeDirty (Node *node, string *err)
 Update the |dirty_| state of the given node by inspecting its input edge. More...
 
bool RecomputeOutputsDirty (Edge *edge, Node *most_recent_input, bool *dirty, string *err)
 Recompute whether any output of the edge is dirty, if so sets |*dirty|. More...
 
void set_build_log (BuildLog *log)
 

Private Member Functions

bool RecomputeDirty (Node *node, vector< Node *> *stack, string *err)
 
bool RecomputeOutputDirty (Edge *edge, Node *most_recent_input, const string &command, Node *output)
 Recompute whether a given single output should be marked dirty. More...
 
bool VerifyDAG (Node *node, vector< Node *> *stack, string *err)
 

Private Attributes

BuildLogbuild_log_
 
ImplicitDepLoader dep_loader_
 
DiskInterfacedisk_interface_
 

Detailed Description

DependencyScan manages the process of scanning the files in a graph and updating the dirty/outputs_ready state of all the nodes and edges.

Definition at line 254 of file graph.h.

Constructor & Destructor Documentation

◆ DependencyScan()

DependencyScan::DependencyScan ( State state,
BuildLog build_log,
DepsLog deps_log,
DiskInterface disk_interface,
DepfileParserOptions const *  depfile_parser_options 
)
inline

Definition at line 255 of file graph.h.

Member Function Documentation

◆ build_log()

BuildLog* DependencyScan::build_log ( ) const
inline

Definition at line 274 of file graph.h.

Referenced by Builder::FinishCommand(), and RecomputeOutputDirty().

◆ deps_log()

DepsLog* DependencyScan::deps_log ( ) const
inline

Definition at line 281 of file graph.h.

Referenced by Builder::FinishCommand().

◆ RecomputeDirty() [1/2]

bool DependencyScan::RecomputeDirty ( Node node,
string *  err 
)

Update the |dirty_| state of the given node by inspecting its input edge.

Examine inputs, outputs, and command lines to judge whether an edge needs to be re-run, and update outputs_ready_ and each outputs' |dirty_| state accordingly. Returns false on failure.

Definition at line 34 of file graph.cc.

Referenced by Builder::AddTarget(), and RecomputeDirty().

◆ RecomputeDirty() [2/2]

bool DependencyScan::RecomputeDirty ( Node node,
vector< Node *> *  stack,
string *  err 
)
private

◆ RecomputeOutputDirty()

bool DependencyScan::RecomputeOutputDirty ( Edge edge,
Node most_recent_input,
const string &  command,
Node output 
)
private

◆ RecomputeOutputsDirty()

bool DependencyScan::RecomputeOutputsDirty ( Edge edge,
Node most_recent_input,
bool *  dirty,
string *  err 
)

Recompute whether any output of the edge is dirty, if so sets |*dirty|.

Returns false on failure.

Definition at line 183 of file graph.cc.

References Edge::EvaluateCommand(), Edge::outputs_, and RecomputeOutputDirty().

Referenced by Plan::CleanNode(), and RecomputeDirty().

◆ set_build_log()

void DependencyScan::set_build_log ( BuildLog log)
inline

Definition at line 277 of file graph.h.

Referenced by Builder::SetBuildLog().

◆ VerifyDAG()

bool DependencyScan::VerifyDAG ( Node node,
vector< Node *> *  stack,
string *  err 
)
private

Member Data Documentation

◆ build_log_

BuildLog* DependencyScan::build_log_
private

Definition at line 294 of file graph.h.

◆ dep_loader_

ImplicitDepLoader DependencyScan::dep_loader_
private

Definition at line 296 of file graph.h.

Referenced by RecomputeDirty().

◆ disk_interface_

DiskInterface* DependencyScan::disk_interface_
private

Definition at line 295 of file graph.h.

Referenced by RecomputeDirty().


The documentation for this struct was generated from the following files: