diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-14 12:32:59 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-02-14 14:53:51 +0200 |
commit | a523eb1b8b74a577e7ff0aa3fce4312acd4b3a75 (patch) | |
tree | 3cac12cad917eccfe8fffb57c7279f2d09bde0ca /build2/algorithm | |
parent | 8a7b3bb944ca08d240fc778a9269c6db0f9746f8 (diff) |
Redo library meta-information protocol without match_only()
Diffstat (limited to 'build2/algorithm')
-rw-r--r-- | build2/algorithm | 26 |
1 files changed, 11 insertions, 15 deletions
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 |