mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
find_better_daddy: position change
This commit is contained in:
parent
dd286323a9
commit
ae918116ab
@ -940,7 +940,6 @@ bytecode_ptr<NFA> mcclellanCompile_i(raw_dfa &raw, accel_dfa_build_strat &strat,
|
|||||||
set<dstate_id_t> *accel_states) {
|
set<dstate_id_t> *accel_states) {
|
||||||
assert(!is_dead(raw));
|
assert(!is_dead(raw));
|
||||||
|
|
||||||
u16 total_daddy = 0;
|
|
||||||
dfa_info info(strat);
|
dfa_info info(strat);
|
||||||
bool using8bit = cc.grey.allowMcClellan8 && info.size() <= 256;
|
bool using8bit = cc.grey.allowMcClellan8 && info.size() <= 256;
|
||||||
|
|
||||||
@ -950,11 +949,16 @@ bytecode_ptr<NFA> mcclellanCompile_i(raw_dfa &raw, accel_dfa_build_strat &strat,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool has_eod_reports = raw.hasEodReports();
|
bool has_eod_reports = raw.hasEodReports();
|
||||||
bool any_cyclic_near_anchored_state = is_cyclic_near(raw,
|
|
||||||
raw.start_anchored);
|
bytecode_ptr<NFA> nfa;
|
||||||
|
if (!using8bit) {
|
||||||
|
u16 total_daddy = 0;
|
||||||
|
bool any_cyclic_near_anchored_state
|
||||||
|
= is_cyclic_near(raw, raw.start_anchored);
|
||||||
|
|
||||||
for (u32 i = 0; i < info.size(); i++) {
|
for (u32 i = 0; i < info.size(); i++) {
|
||||||
find_better_daddy(info, i, using8bit, any_cyclic_near_anchored_state,
|
find_better_daddy(info, i, using8bit,
|
||||||
|
any_cyclic_near_anchored_state,
|
||||||
trust_daddy_states, cc.grey);
|
trust_daddy_states, cc.grey);
|
||||||
total_daddy += info.extra[i].daddytaken;
|
total_daddy += info.extra[i].daddytaken;
|
||||||
}
|
}
|
||||||
@ -963,8 +967,6 @@ bytecode_ptr<NFA> mcclellanCompile_i(raw_dfa &raw, accel_dfa_build_strat &strat,
|
|||||||
info.size() * info.impl_alpha_size, info.size(),
|
info.size() * info.impl_alpha_size, info.size(),
|
||||||
info.impl_alpha_size);
|
info.impl_alpha_size);
|
||||||
|
|
||||||
bytecode_ptr<NFA> nfa;
|
|
||||||
if (!using8bit) {
|
|
||||||
nfa = mcclellanCompile16(info, cc, accel_states);
|
nfa = mcclellanCompile16(info, cc, accel_states);
|
||||||
} else {
|
} else {
|
||||||
nfa = mcclellanCompile8(info, cc, accel_states);
|
nfa = mcclellanCompile8(info, cc, accel_states);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user