mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
LimEx NFA: no need to zero init cached_esucc
All of the "exception cache" members are guarded by cached_esucc.
This commit is contained in:
parent
510e999738
commit
01498fa8a5
@ -542,7 +542,6 @@ char JOIN(LIMEX_API_ROOT, _Q)(const struct NFA *n, struct mq *q, s64a end) {
|
|||||||
ctx->callback = q->cb;
|
ctx->callback = q->cb;
|
||||||
ctx->context = q->context;
|
ctx->context = q->context;
|
||||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
||||||
STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
|
|
||||||
|
|
||||||
assert(q->items[q->cur].location >= 0);
|
assert(q->items[q->cur].location >= 0);
|
||||||
DEBUG_PRINTF("LOAD STATE\n");
|
DEBUG_PRINTF("LOAD STATE\n");
|
||||||
@ -638,7 +637,6 @@ char JOIN(LIMEX_API_ROOT, _Q2)(const struct NFA *n, struct mq *q, s64a end) {
|
|||||||
ctx->callback = q->cb;
|
ctx->callback = q->cb;
|
||||||
ctx->context = q->context;
|
ctx->context = q->context;
|
||||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
||||||
STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
|
|
||||||
|
|
||||||
DEBUG_PRINTF("LOAD STATE\n");
|
DEBUG_PRINTF("LOAD STATE\n");
|
||||||
STORE_STATE(&ctx->s, LOAD_STATE(q->state));
|
STORE_STATE(&ctx->s, LOAD_STATE(q->state));
|
||||||
@ -730,7 +728,6 @@ char JOIN(LIMEX_API_ROOT, _QR)(const struct NFA *n, struct mq *q,
|
|||||||
ctx->callback = NULL;
|
ctx->callback = NULL;
|
||||||
ctx->context = NULL;
|
ctx->context = NULL;
|
||||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
||||||
STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
|
|
||||||
|
|
||||||
DEBUG_PRINTF("LOAD STATE\n");
|
DEBUG_PRINTF("LOAD STATE\n");
|
||||||
STORE_STATE(&ctx->s, LOAD_STATE(q->state));
|
STORE_STATE(&ctx->s, LOAD_STATE(q->state));
|
||||||
@ -833,7 +830,6 @@ char JOIN(LIMEX_API_ROOT, _B_Reverse)(const struct NFA *n, u64a offset,
|
|||||||
ctx->callback = cb;
|
ctx->callback = cb;
|
||||||
ctx->context = context;
|
ctx->context = context;
|
||||||
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
STORE_STATE(&ctx->cached_estate, ZERO_STATE);
|
||||||
STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
|
|
||||||
|
|
||||||
const IMPL_NFA_T *limex = getImplNfa(n);
|
const IMPL_NFA_T *limex = getImplNfa(n);
|
||||||
STORE_STATE(&ctx->s, INITIAL_FN(limex, 0)); // always anchored
|
STORE_STATE(&ctx->s, INITIAL_FN(limex, 0)); // always anchored
|
||||||
|
Loading…
x
Reference in New Issue
Block a user