mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-18 18:20:35 +03:00
dfa: only accel init states from smwr path
If the small-write DFA has been built from literals, then we only need to look for accel states at init.
This commit is contained in:
committed by
Matthew Barr
parent
41d7aa8281
commit
0dd8536c6e
@@ -45,8 +45,9 @@ struct raw_dfa;
|
||||
|
||||
class sheng_build_strat : public accel_dfa_build_strat {
|
||||
public:
|
||||
sheng_build_strat(raw_dfa &rdfa_in, const ReportManager &rm_in)
|
||||
: accel_dfa_build_strat(rm_in), rdfa(rdfa_in) {}
|
||||
sheng_build_strat(raw_dfa &rdfa_in, const ReportManager &rm_in,
|
||||
bool only_accel_init_in)
|
||||
: accel_dfa_build_strat(rm_in, only_accel_init_in), rdfa(rdfa_in) {}
|
||||
raw_dfa &get_raw() const override { return rdfa; }
|
||||
std::unique_ptr<raw_report_info> gatherReports(
|
||||
std::vector<u32> &reports /* out */,
|
||||
@@ -63,7 +64,7 @@ private:
|
||||
};
|
||||
|
||||
bytecode_ptr<NFA> shengCompile(raw_dfa &raw, const CompileContext &cc,
|
||||
const ReportManager &rm,
|
||||
const ReportManager &rm, bool only_accel_init,
|
||||
std::set<dstate_id_t> *accel_states = nullptr);
|
||||
|
||||
struct sheng_escape_info {
|
||||
|
||||
Reference in New Issue
Block a user