mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 18:20:35 +03:00
Rose: remove alignment req for anchored DFA state
This commit is contained in:
committed by
Matthew Barr
parent
060defe6c4
commit
28f379d738
@@ -228,7 +228,7 @@ u32 anchoredStateSize(const anchored_matcher_info &atable) {
|
||||
}
|
||||
|
||||
const NFA *nfa = (const NFA *)((const char *)curr + sizeof(*curr));
|
||||
return curr->state_offset + nfa->scratchStateSize;
|
||||
return curr->state_offset + nfa->streamStateSize;
|
||||
}
|
||||
|
||||
bool anchoredIsMulti(const anchored_matcher_info &atable) {
|
||||
@@ -849,15 +849,8 @@ buildAnchoredAutomataMatcher(RoseBuildImpl &build, size_t *asize) {
|
||||
ami->next_offset = verify_u32(curr - prev_curr);
|
||||
}
|
||||
|
||||
// State must be aligned.
|
||||
u32 align_req = state_alignment(*nfa);
|
||||
assert(align_req <= 2); // only DFAs.
|
||||
while (state_offset % align_req) {
|
||||
state_offset++;
|
||||
}
|
||||
|
||||
ami->state_offset = state_offset;
|
||||
state_offset += nfa->scratchStateSize;
|
||||
state_offset += nfa->streamStateSize;
|
||||
ami->anchoredMinDistance = start_offset[i];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user