rose: use program offset, not final_id, in atable

This removes the need to look up the program offset in a table when
handling an anchored literal match.
This commit is contained in:
Justin Viiret
2016-07-14 11:40:49 +10:00
committed by Matthew Barr
parent 4dbbc4eaa5
commit 8754cbbd24
4 changed files with 42 additions and 9 deletions

View File

@@ -56,10 +56,13 @@ std::vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build);
/**
* \brief Construct an anchored_matcher_info runtime structure from the given
* set of DFAs.
*
* Remap the literal final_ids used for raw_dfa reports to the program offsets
* given in litPrograms.
*/
aligned_unique_ptr<anchored_matcher_info>
buildAnchoredMatcher(RoseBuildImpl &build, std::vector<raw_dfa> &dfas,
size_t *asize);
const std::vector<u32> &litPrograms, size_t *asize);
u32 anchoredStateSize(const anchored_matcher_info &atable);