mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 09:45:28 +03:00
allow streams to marked as exhausted in more cases
At stream boundaries, we can mark streams as exhausted if there are no groups active and there are no other ways to report matches. This allows us to stop maintaining the history buffer on subsequent stream writes. Previously, streams were only marked as exhausted if a pure highlander case reported all patterns or the outfix in a sole outfix case died.
This commit is contained in:
@@ -1082,6 +1082,13 @@ bool isAnchored(const left_id &r) {
|
||||
if (r.graph()) {
|
||||
return isAnchored(*r.graph());
|
||||
}
|
||||
if (r.dfa()) {
|
||||
return r.dfa()->start_anchored == DEAD_STATE;
|
||||
}
|
||||
if (r.haig()) {
|
||||
return r.haig()->start_anchored == DEAD_STATE;
|
||||
}
|
||||
|
||||
// All other types are explicitly anchored.
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user