mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
roseEnginesEod: trust the queue structure
This commit is contained in:
parent
d9bd6d5dee
commit
159c09b70e
@ -826,22 +826,18 @@ hwlmcb_rv_t roseEnginesEod(const struct RoseEngine *rose,
|
|||||||
for (u32 qi = mmbit_sparse_iter_begin(aa, aaCount, &idx, it, si_state);
|
for (u32 qi = mmbit_sparse_iter_begin(aa, aaCount, &idx, it, si_state);
|
||||||
qi != MMB_INVALID;
|
qi != MMB_INVALID;
|
||||||
qi = mmbit_sparse_iter_next(aa, aaCount, qi, &idx, it, si_state)) {
|
qi = mmbit_sparse_iter_next(aa, aaCount, qi, &idx, it, si_state)) {
|
||||||
const struct NfaInfo *info = getNfaInfoByQueue(rose, qi);
|
|
||||||
const struct NFA *nfa = getNfaByInfo(rose, info);
|
|
||||||
|
|
||||||
DEBUG_PRINTF("checking nfa %u\n", qi);
|
DEBUG_PRINTF("checking nfa %u\n", qi);
|
||||||
assert(nfaAcceptsEod(nfa));
|
struct mq *q = scratch->queues + qi;
|
||||||
|
assert(q->nfa == getNfaByQueue(rose, qi));
|
||||||
char *fstate = scratch->fullState + info->fullStateOffset;
|
assert(nfaAcceptsEod(q->nfa));
|
||||||
const char *sstate = scratch->core_info.state + info->stateOffset;
|
|
||||||
|
|
||||||
if (is_streaming) {
|
if (is_streaming) {
|
||||||
// Decompress stream state.
|
// Decompress stream state.
|
||||||
nfaExpandState(nfa, fstate, sstate, offset, key);
|
nfaExpandState(q->nfa, q->state, q->streamState, offset, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nfaCheckFinalState(nfa, fstate, sstate, offset, roseReportAdaptor,
|
if (nfaCheckFinalState(q->nfa, q->state, q->streamState, offset,
|
||||||
roseReportSomAdaptor,
|
roseReportAdaptor, roseReportSomAdaptor,
|
||||||
scratch) == MO_HALT_MATCHING) {
|
scratch) == MO_HALT_MATCHING) {
|
||||||
DEBUG_PRINTF("user instructed us to stop\n");
|
DEBUG_PRINTF("user instructed us to stop\n");
|
||||||
return HWLM_TERMINATE_MATCHING;
|
return HWLM_TERMINATE_MATCHING;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user