mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
eod: tidy runtime
This commit is contained in:
parent
78e4332a8b
commit
ae157034e9
@ -55,11 +55,17 @@ void initContext(const struct RoseEngine *t, u64a offset,
|
|||||||
fatbit_clear(scratch->aqa);
|
fatbit_clear(scratch->aqa);
|
||||||
}
|
}
|
||||||
|
|
||||||
static rose_inline
|
static really_inline
|
||||||
int roseRunEodProgram(const struct RoseEngine *t, u64a offset,
|
void roseEodExec_i(const struct RoseEngine *t, u64a offset,
|
||||||
struct hs_scratch *scratch) {
|
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) {
|
if (!t->eodProgramOffset) {
|
||||||
return MO_CONTINUE_MATCHING;
|
DEBUG_PRINTF("no eod program\n");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_PRINTF("running eod program at %u\n", t->eodProgramOffset);
|
DEBUG_PRINTF("running eod program at %u\n", t->eodProgramOffset);
|
||||||
@ -73,25 +79,11 @@ int roseRunEodProgram(const struct RoseEngine *t, u64a offset,
|
|||||||
const char in_catchup = 0;
|
const char in_catchup = 0;
|
||||||
const char from_mpv = 0;
|
const char from_mpv = 0;
|
||||||
const char skip_mpv_catchup = 1;
|
const char skip_mpv_catchup = 1;
|
||||||
if (roseRunProgram(t, scratch, t->eodProgramOffset, som, offset, match_len,
|
|
||||||
in_anchored, in_catchup, from_mpv,
|
|
||||||
skip_mpv_catchup) == HWLM_TERMINATE_MATCHING) {
|
|
||||||
return MO_HALT_MATCHING;
|
|
||||||
}
|
|
||||||
|
|
||||||
return MO_CONTINUE_MATCHING;
|
// 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,
|
||||||
static really_inline
|
in_anchored, in_catchup, from_mpv, skip_mpv_catchup);
|
||||||
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));
|
|
||||||
|
|
||||||
// Run the unconditional EOD program.
|
|
||||||
roseRunEodProgram(t, offset, scratch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void roseEodExec(const struct RoseEngine *t, u64a offset,
|
void roseEodExec(const struct RoseEngine *t, u64a offset,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user