Rose: pack global state bits into one u8

Eliminate the RoseRuntimeState structure in favour of a single status
byte that is stored in scratch and copied to/from stream state.
This commit is contained in:
Justin Viiret
2016-02-02 09:42:00 +11:00
committed by Matthew Barr
parent 28f379d738
commit 9e9bb6a960
14 changed files with 84 additions and 129 deletions

View File

@@ -55,14 +55,6 @@
#define rose_inline really_inline
/** \brief Fetch runtime state ptr. */
static really_inline
struct RoseRuntimeState *getRuntimeState(char *state) {
struct RoseRuntimeState *rs = (struct RoseRuntimeState *)(state);
assert(ISALIGNED_N(rs, 8));
return rs;
}
static really_inline
const void *getByOffset(const struct RoseEngine *t, u32 offset) {
assert(offset < t->size);
@@ -71,7 +63,7 @@ const void *getByOffset(const struct RoseEngine *t, u32 offset) {
static really_inline
void *getRoleState(char *state) {
return state + sizeof(struct RoseRuntimeState);
return state + sizeof(u8); // status flags
}
/** \brief Fetch the active array for suffix nfas. */