mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +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
@@ -829,7 +829,7 @@ size_t buildNfas(vector<raw_dfa> &anchored_dfas,
|
||||
|
||||
minimize_hopcroft(rdfa, cc.grey);
|
||||
|
||||
auto nfa = mcclellanCompile(rdfa, cc, rm);
|
||||
auto nfa = mcclellanCompile(rdfa, cc, rm, false);
|
||||
if (!nfa) {
|
||||
assert(0);
|
||||
throw std::bad_alloc();
|
||||
|
@@ -720,7 +720,7 @@ bytecode_ptr<NFA> getDfa(raw_dfa &rdfa, bool is_transient,
|
||||
const CompileContext &cc,
|
||||
const ReportManager &rm) {
|
||||
// Unleash the Sheng!!
|
||||
auto dfa = shengCompile(rdfa, cc, rm);
|
||||
auto dfa = shengCompile(rdfa, cc, rm, false);
|
||||
if (!dfa && !is_transient) {
|
||||
// Sheng wasn't successful, so unleash McClellan!
|
||||
/* We don't try the hybrid for transient prefixes due to the extra
|
||||
@@ -729,7 +729,7 @@ bytecode_ptr<NFA> getDfa(raw_dfa &rdfa, bool is_transient,
|
||||
}
|
||||
if (!dfa) {
|
||||
// Sheng wasn't successful, so unleash McClellan!
|
||||
dfa = mcclellanCompile(rdfa, cc, rm);
|
||||
dfa = mcclellanCompile(rdfa, cc, rm, false);
|
||||
}
|
||||
return dfa;
|
||||
}
|
||||
|
Reference in New Issue
Block a user