]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
LimEx NFA: no need to zero init cached_esucc
authorJustin Viiret <justin.viiret@intel.com>
Sun, 1 Nov 2015 23:20:37 +0000 (10:20 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 10 Nov 2015 03:25:05 +0000 (14:25 +1100)
All of the "exception cache" members are guarded by cached_esucc.

src/nfa/limex_runtime_impl.h

index 611fe74790fe9e81b771aa1f5e27118c14809490..703a7d19207be443d45d00f1a1e2ce944ef61cc5 100644 (file)
@@ -542,7 +542,6 @@ char JOIN(LIMEX_API_ROOT, _Q)(const struct NFA *n, struct mq *q, s64a end) {
     ctx->callback = q->cb;
     ctx->context = q->context;
     STORE_STATE(&ctx->cached_estate, ZERO_STATE);
-    STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
 
     assert(q->items[q->cur].location >= 0);
     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->context = q->context;
     STORE_STATE(&ctx->cached_estate, ZERO_STATE);
-    STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
 
     DEBUG_PRINTF("LOAD STATE\n");
     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->context = NULL;
     STORE_STATE(&ctx->cached_estate, ZERO_STATE);
-    STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
 
     DEBUG_PRINTF("LOAD STATE\n");
     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->context = context;
     STORE_STATE(&ctx->cached_estate, ZERO_STATE);
-    STORE_STATE(&ctx->cached_esucc, ZERO_STATE);
 
     const IMPL_NFA_T *limex = getImplNfa(n);
     STORE_STATE(&ctx->s, INITIAL_FN(limex, 0)); // always anchored