mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 01:41:51 +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:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -214,7 +214,7 @@ void pureLiteralBlockExec(const struct RoseEngine *rose,
|
||||
scratch->tctxt.groups = rose->initialGroups;
|
||||
|
||||
hwlmExec(ftable, buffer, length, 0, roseCallback, scratch,
|
||||
rose->initialGroups);
|
||||
rose->initialGroups & rose->floating_group_mask);
|
||||
}
|
||||
|
||||
static really_inline
|
||||
@@ -762,7 +762,7 @@ void pureLiteralStreamExec(struct hs_stream *stream_state,
|
||||
const size_t start = 0;
|
||||
|
||||
hwlmExecStreaming(ftable, scratch, len2, start, roseCallback, scratch,
|
||||
rose->initialGroups);
|
||||
rose->initialGroups & rose->floating_group_mask);
|
||||
|
||||
if (!told_to_stop_matching(scratch) &&
|
||||
isAllExhausted(rose, scratch->core_info.exhaustionVector)) {
|
||||
|
||||
Reference in New Issue
Block a user