mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
eod: tidy up, rename to roseStreamEodExec
This commit is contained in:
parent
66e0b77aa4
commit
d5c1280b9f
@ -55,38 +55,7 @@ void initContext(const struct RoseEngine *t, u64a offset,
|
|||||||
fatbit_clear(scratch->aqa);
|
fatbit_clear(scratch->aqa);
|
||||||
}
|
}
|
||||||
|
|
||||||
static really_inline
|
void roseStreamEodExec(const struct RoseEngine *t, u64a offset,
|
||||||
void roseEodExec_i(const struct RoseEngine *t, u64a offset,
|
|
||||||
struct hs_scratch *scratch, UNUSED const char is_streaming) {
|
|
||||||
assert(t);
|
|
||||||
assert(scratch->core_info.buf || scratch->core_info.hbuf);
|
|
||||||
assert(!scratch->core_info.buf || !scratch->core_info.hbuf);
|
|
||||||
assert(!can_stop_matching(scratch));
|
|
||||||
|
|
||||||
if (!t->eodProgramOffset) {
|
|
||||||
DEBUG_PRINTF("no eod program\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_PRINTF("running eod program at %u\n", t->eodProgramOffset);
|
|
||||||
|
|
||||||
// There should be no pending delayed literals.
|
|
||||||
assert(!scratch->tctxt.filledDelayedSlots);
|
|
||||||
|
|
||||||
const u64a som = 0;
|
|
||||||
const size_t match_len = 0;
|
|
||||||
const char in_anchored = 0;
|
|
||||||
const char in_catchup = 0;
|
|
||||||
const char from_mpv = 0;
|
|
||||||
const char skip_mpv_catchup = 1;
|
|
||||||
|
|
||||||
// Note: we ignore the result, as this is the last thing to ever happen on
|
|
||||||
// a scan.
|
|
||||||
roseRunProgram(t, scratch, t->eodProgramOffset, som, offset, match_len,
|
|
||||||
in_anchored, in_catchup, from_mpv, skip_mpv_catchup);
|
|
||||||
}
|
|
||||||
|
|
||||||
void roseEodExec(const struct RoseEngine *t, u64a offset,
|
|
||||||
struct hs_scratch *scratch) {
|
struct hs_scratch *scratch) {
|
||||||
assert(scratch);
|
assert(scratch);
|
||||||
assert(t->requiresEodCheck);
|
assert(t->requiresEodCheck);
|
||||||
@ -105,6 +74,27 @@ void roseEodExec(const struct RoseEngine *t, u64a offset,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
initContext(t, offset, scratch);
|
if (!t->eodProgramOffset) {
|
||||||
roseEodExec_i(t, offset, scratch, 1);
|
DEBUG_PRINTF("no eod program\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
initContext(t, offset, scratch);
|
||||||
|
|
||||||
|
DEBUG_PRINTF("running eod program at %u\n", t->eodProgramOffset);
|
||||||
|
|
||||||
|
// There should be no pending delayed literals.
|
||||||
|
assert(!scratch->tctxt.filledDelayedSlots);
|
||||||
|
|
||||||
|
const u64a som = 0;
|
||||||
|
const size_t match_len = 0;
|
||||||
|
const char in_anchored = 0;
|
||||||
|
const char in_catchup = 0;
|
||||||
|
const char from_mpv = 0;
|
||||||
|
const char skip_mpv_catchup = 1;
|
||||||
|
|
||||||
|
// Note: we ignore the result, as this is the last thing to ever happen on
|
||||||
|
// a scan.
|
||||||
|
roseRunProgram(t, scratch, t->eodProgramOffset, som, offset, match_len,
|
||||||
|
in_anchored, in_catchup, from_mpv, skip_mpv_catchup);
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,7 @@ void roseBlockExec(const struct RoseEngine *t, struct hs_scratch *scratch);
|
|||||||
/* assumes core_info in scratch has been init to point to data */
|
/* assumes core_info in scratch has been init to point to data */
|
||||||
void roseStreamExec(const struct RoseEngine *t, struct hs_scratch *scratch);
|
void roseStreamExec(const struct RoseEngine *t, struct hs_scratch *scratch);
|
||||||
|
|
||||||
void roseEodExec(const struct RoseEngine *t, u64a offset,
|
void roseStreamEodExec(const struct RoseEngine *t, u64a offset,
|
||||||
struct hs_scratch *scratch);
|
struct hs_scratch *scratch);
|
||||||
|
|
||||||
hwlmcb_rv_t rosePureLiteralCallback(size_t start, size_t end, u32 id,
|
hwlmcb_rv_t rosePureLiteralCallback(size_t start, size_t end, u32 id,
|
||||||
|
@ -532,7 +532,7 @@ void rawEodExec(hs_stream_t *id, hs_scratch_t *scratch) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
roseEodExec(rose, id->offset, scratch);
|
roseStreamEodExec(rose, id->offset, scratch);
|
||||||
}
|
}
|
||||||
|
|
||||||
static never_inline
|
static never_inline
|
||||||
|
Loading…
x
Reference in New Issue
Block a user