From a523eb1b8b74a577e7ff0aa3fce4312acd4b3a75 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Feb 2017 12:32:59 +0200 Subject: Redo library meta-information protocol without match_only() --- build2/algorithm | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'build2/algorithm') diff --git a/build2/algorithm b/build2/algorithm index 18f2fce..d360fad 100644 --- a/build2/algorithm +++ b/build2/algorithm @@ -78,27 +78,23 @@ namespace build2 // Match and apply a rule to the action/target with ambiguity detection. // Increment the target's dependents count, which means that you should call - // this function with the intent to also call execute(). In case of - // optimizations that would avoid calling execute(), call unmatch() to - // indicate this. + // this function with the intent to also call execute(). // - void + // In case of optimizations that would avoid calling execute(), call + // unmatch() to indicate this. This is only allowed in the following + // cases: + // + // - target::unchanged() returns true + // - match() returns true + // + // Note that match() does not check unchanged(). + // + bool match (slock&, action, target&); - // Note that calling this function only makes sense if the target itself - // doesn't have its own dependents (since they will not be unmatched) or - // if you know for sure that someone else will match and execute this - // target for real. - // void unmatch (action, target&); - // Match (but do not apply) a rule to the action/target with ambiguity - // detection. Note that this function does not touch the dependents count. - // - void - match_only (slock&, action, target&); - // Match a "delegate rule" from withing another rules' apply() function // avoiding recursive matches (thus the third argument). Return recipe and // recipe action (if any). Note that unlike match(), this call doesn't -- cgit v1.1