Rose: use program for all literal matches

Unifies all literal match paths so that the Rose program is used for all
of them. This removes the previous specialised "direct report" and
"multi direct report" paths. Some additional REPORT instruction work was
necessary for this.

Reworked literal construction path at compile time in prep for using
program offsets as literal IDs.

Completely removed the anchored log runtime, which is no longer worth
the extra complexity.
This commit is contained in:
Justin Viiret
2016-02-18 09:45:37 +11:00
committed by Matthew Barr
parent b58d05dfec
commit 67b9784dae
26 changed files with 681 additions and 1176 deletions

View File

@@ -85,6 +85,10 @@ void roseBlockExec(const struct RoseEngine *t, struct hs_scratch *scratch,
assert(scratch);
assert(scratch->core_info.buf);
// We should not have been called if we've already been told to terminate
// matching.
assert(!told_to_stop_matching(scratch));
// If this block is shorter than our minimum width, then no pattern in this
// RoseEngine could match.
/* minWidth checks should have already been performed by the caller */
@@ -124,4 +128,7 @@ void roseEodExec(const struct RoseEngine *t, u64a offset,
struct hs_scratch *scratch, RoseCallback callback,
RoseCallbackSom som_callback);
hwlmcb_rv_t rosePureLiteralCallback(size_t start, size_t end, u32 id,
void *context);
#endif // ROSE_H