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

@@ -80,16 +80,6 @@ u8 *getActiveLeftArray(const struct RoseEngine *t, char *state) {
return (u8 *)(state + t->stateOffsets.activeLeftArray);
}
static really_inline
const u32 *getAnchoredInverseMap(const struct RoseEngine *t) {
return (const u32 *)(((const u8 *)t) + t->anchoredReportInverseMapOffset);
}
static really_inline
const u32 *getAnchoredMap(const struct RoseEngine *t) {
return (const u32 *)(((const u8 *)t) + t->anchoredReportMapOffset);
}
static really_inline
rose_group loadGroups(const struct RoseEngine *t, const char *state) {
return partial_load_u64a(state + t->stateOffsets.groups,
@@ -167,8 +157,6 @@ const struct internal_report *getInternalReport(const struct RoseEngine *t,
return reports + intId;
}
#define ANCHORED_MATCH_SENTINEL (~0U)
static really_inline
void updateLastMatchOffset(struct RoseContext *tctxt, u64a offset) {
DEBUG_PRINTF("match @%llu, last match @%llu\n", offset,