Lines Matching refs:edge
85 Edge* edge = node->in_edge();
86 if (!edge) {
90 // This node has no in-edge; it is dirty if it is missing.
94 EXPLAIN("%s has no in-edge and is missing", node->path().c_str());
99 // If we already finished this edge then we are done.
100 if (edge->mark_ == Edge::VisitDone)
103 // If we encountered this edge earlier in the call stack we have a cycle.
107 // Mark the edge temporarily while in the call stack.
108 edge->mark_ = Edge::VisitInStack;
112 edge->outputs_ready_ = true;
113 edge->deps_missing_ = false;
115 if (!edge->deps_loaded_) {
116 // This is our first encounter with this edge.
124 // input to this edge, the edge will not be considered ready below.
126 // loaded to update this edge before it can possibly be scheduled.
127 if (edge->dyndep_ && edge->dyndep_->dyndep_pending()) {
128 if (!RecomputeNodeDirty(edge->dyndep_, stack, validation_nodes, err))
131 if (!edge->dyndep_->in_edge() ||
132 edge->dyndep_->in_edge()->outputs_ready()) {
134 if (!LoadDyndeps(edge->dyndep_, err))
141 for (vector<Node*>::iterator o = edge->outputs_.begin();
142 o != edge->outputs_.end(); ++o) {
147 if (!edge->deps_loaded_) {
148 // This is our first encounter with this edge. Load discovered deps.
149 edge->deps_loaded_ = true;
150 if (!dep_loader_.LoadDeps(edge, err)) {
155 dirty = edge->deps_missing_ = true;
159 // Store any validation nodes from the edge for adding to the initial
165 edge->validations_.begin(), edge->validations_.end());
169 for (vector<Node*>::iterator i = edge->inputs_.begin();
170 i != edge->inputs_.end(); ++i) {
178 edge->outputs_ready_ = false;
181 if (!edge->is_order_only(i - edge->inputs_.begin())) {
198 if (!RecomputeOutputsDirty(edge, most_recent_input, &dirty, err))
202 for (vector<Node*>::iterator o = edge->outputs_.begin();
203 o != edge->outputs_.end(); ++o) {
208 // If an edge is dirty, its outputs are normally not ready. (It's
213 if (dirty && !(edge->is_phony() && edge->inputs_.empty()))
214 edge->outputs_ready_ = false;
216 // Mark the edge as finished during this walk now that it will no longer
218 edge->mark_ = Edge::VisitDone;
226 Edge* edge = node->in_edge();
227 assert(edge != NULL);
229 // If we have no temporary mark on the edge then we do not yet have a cycle.
230 if (edge->mark_ != Edge::VisitInStack)
233 // We have this edge earlier in the call stack. Find it.
235 while (start != stack->end() && (*start)->in_edge() != edge)
240 // instead of some other output of the starting edge. For example,
255 if ((start + 1) == stack->end() && edge->maybe_phonycycle_diagnostic()) {
264 bool DependencyScan::RecomputeOutputsDirty(Edge* edge, Node* most_recent_input,
266 string command = edge->EvaluateCommand(/*incl_rsp_file=*/true);
267 for (vector<Node*>::iterator o = edge->outputs_.begin();
268 o != edge->outputs_.end(); ++o) {
269 if (RecomputeOutputDirty(edge, most_recent_input, command, *o)) {
277 bool DependencyScan::RecomputeOutputDirty(const Edge* edge,
281 if (edge->is_phony()) {
284 if (edge->inputs_.empty() && !output->exists()) {
285 EXPLAIN("output %s of phony edge with no inputs doesn't exist",
315 if (edge->GetBindingBool("restat") && build_log() &&
331 bool generator = edge->GetBindingBool("generator");
385 EdgeEnv(const Edge* const edge, const EscapeKind escape)
386 : edge_(edge), escape_in_out_(escape), recursive_(false) {}
611 in_edge()->Dump("in-edge: ");
613 printf("no in-edge\n");
629 bool ImplicitDepLoader::LoadDeps(Edge* edge, string* err) {
630 string deps_type = edge->GetBinding("deps");
632 return LoadDepsFromLog(edge, err);
634 string depfile = edge->GetUnescapedDepfile();
636 return LoadDepFile(edge, depfile, err);
653 bool ImplicitDepLoader::LoadDepFile(Edge* edge, const string& path,
693 // Check that this depfile matches the edge's output, if not return false to
694 // mark the edge as dirty.
695 Node* first_output = edge->outputs_[0];
703 // Ensure that all mentioned outputs are outputs of the edge.
707 if (std::find_if(edge->outputs_.begin(), edge->outputs_.end(), m) == edge->outputs_.end()) {
713 return ProcessDepfileDeps(edge, &depfile.ins_, err);
717 Edge* edge, std::vector<StringPiece>* depfile_ins, std::string* err) {
718 // Preallocate space in edge->inputs_ to be filled in below.
720 PreallocateSpace(edge, depfile_ins->size());
729 node->AddOutEdge(edge);
735 bool ImplicitDepLoader::LoadDepsFromLog(Edge* edge, string* err) {
737 Node* output = edge->outputs_[0];
752 PreallocateSpace(edge, deps->node_count);
756 node->AddOutEdge(edge);
761 vector<Node*>::iterator ImplicitDepLoader::PreallocateSpace(Edge* edge,
763 edge->inputs_.insert(edge->inputs_.end() - edge->order_only_deps_,
765 edge->implicit_deps_ += count;
766 return edge->inputs_.end() - edge->order_only_deps_ - count;