mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 03:34:25 +03:00
Merge branch 'develop' into wip-isildur-g-cppcheck-47-48-58
This commit is contained in:
@@ -192,7 +192,7 @@ int roseCountingMiracleOccurs(const struct RoseEngine *t,
|
||||
|
||||
u32 count = 0;
|
||||
|
||||
s64a m_loc = start;
|
||||
s64a m_loc;
|
||||
|
||||
if (!cm->shufti) {
|
||||
u8 c = cm->c;
|
||||
|
@@ -131,7 +131,6 @@ void findMaskLiteral(const vector<CharReach> &mask, bool streaming,
|
||||
if (better) {
|
||||
best_begin = begin;
|
||||
best_end = end;
|
||||
best_len = len;
|
||||
}
|
||||
|
||||
for (size_t i = best_begin; i < best_end; i++) {
|
||||
@@ -393,8 +392,9 @@ bool validateTransientMask(const vector<CharReach> &mask, bool anchored,
|
||||
none_of(begin(lits), end(lits), mixed_sensitivity));
|
||||
|
||||
// Build the HWLM literal mask.
|
||||
vector<u8> msk, cmp;
|
||||
vector<u8> msk;
|
||||
if (grey.roseHamsterMasks) {
|
||||
vector<u8> cmp;
|
||||
buildLiteralMask(mask, msk, cmp, delay);
|
||||
}
|
||||
|
||||
|
@@ -2251,10 +2251,9 @@ vector<u32> buildSuffixEkeyLists(const RoseBuildImpl &build, build_context &bc,
|
||||
|
||||
/* for each outfix also build elists */
|
||||
for (const auto &outfix : build.outfixes) {
|
||||
u32 qi = outfix.get_queue();
|
||||
set<u32> ekeys = reportsToEkeys(all_reports(outfix), build.rm);
|
||||
|
||||
if (!ekeys.empty()) {
|
||||
u32 qi = outfix.get_queue();
|
||||
qi_to_ekeys[qi] = {ekeys.begin(), ekeys.end()};
|
||||
}
|
||||
}
|
||||
@@ -2975,7 +2974,8 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
|
||||
!lit_prog.empty()) {
|
||||
const auto &cfrag = fragments[pfrag.included_frag_id];
|
||||
assert(pfrag.s.length() >= cfrag.s.length() &&
|
||||
!pfrag.s.any_nocase() >= !cfrag.s.any_nocase());
|
||||
!pfrag.s.any_nocase() == !cfrag.s.any_nocase());
|
||||
/** !pfrag.s.any_nocase() >= !cfrag.s.any_nocase()); **/
|
||||
u32 child_offset = cfrag.lit_program_offset;
|
||||
DEBUG_PRINTF("child %u offset %u\n", cfrag.fragment_id,
|
||||
child_offset);
|
||||
@@ -2992,8 +2992,8 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
|
||||
pfrag.lit_ids);
|
||||
if (pfrag.included_delay_frag_id != INVALID_FRAG_ID &&
|
||||
!rebuild_prog.empty()) {
|
||||
const auto &cfrag = fragments[pfrag.included_delay_frag_id];
|
||||
assert(pfrag.s.length() >= cfrag.s.length() &&
|
||||
/** assert(pfrag.s.length() >= cfrag.s.length() && **/
|
||||
assert(pfrag.s.length() == cfrag.s.length() &&
|
||||
!pfrag.s.any_nocase() >= !cfrag.s.any_nocase());
|
||||
u32 child_offset = cfrag.delay_program_offset;
|
||||
DEBUG_PRINTF("child %u offset %u\n", cfrag.fragment_id,
|
||||
|
@@ -170,7 +170,6 @@ void renovateCastle(RoseBuildImpl &tbi, CastleProto *castle,
|
||||
return; /* bail - TODO: be less lazy */
|
||||
}
|
||||
|
||||
vector<CharReach> rem_local_cr;
|
||||
u32 ok_count = 0;
|
||||
for (auto it = e.s.end() - g[v].left.lag; it != e.s.end(); ++it) {
|
||||
if (!isSubsetOf(*it, cr)) {
|
||||
|
@@ -884,7 +884,7 @@ void buildAccel(const RoseBuildImpl &build,
|
||||
}
|
||||
|
||||
bytecode_ptr<HWLM>
|
||||
buildHWLMMatcher(const RoseBuildImpl &build, LitProto *litProto) {
|
||||
buildHWLMMatcher(const RoseBuildImpl &build, const LitProto *litProto) {
|
||||
if (!litProto) {
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -101,7 +101,7 @@ struct LitProto {
|
||||
};
|
||||
|
||||
bytecode_ptr<HWLM>
|
||||
buildHWLMMatcher(const RoseBuildImpl &build, LitProto *proto);
|
||||
buildHWLMMatcher(const RoseBuildImpl &build, const LitProto *proto);
|
||||
|
||||
std::unique_ptr<LitProto>
|
||||
buildFloatingMatcherProto(const RoseBuildImpl &build,
|
||||
|
@@ -1599,7 +1599,8 @@ void dedupeLeftfixesVariableLag(RoseBuildImpl &build) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
engine_groups[DedupeLeftKey(build, std::move(preds), left)].emplace_back(left);
|
||||
auto preds_copy = std::move(preds);
|
||||
engine_groups[DedupeLeftKey(build, preds_copy , left)].emplace_back(left);
|
||||
}
|
||||
|
||||
/* We don't bother chunking as we expect deduping to be successful if the
|
||||
|
@@ -1004,9 +1004,9 @@ bool hasOrphanedTops(const RoseBuildImpl &build) {
|
||||
|
||||
for (auto v : vertices_range(g)) {
|
||||
if (g[v].left) {
|
||||
set<u32> &tops = leftfixes[g[v].left];
|
||||
if (!build.isRootSuccessor(v)) {
|
||||
// Tops for infixes come from the in-edges.
|
||||
set<u32> &tops = leftfixes[g[v].left];
|
||||
for (const auto &e : in_edges_range(v, g)) {
|
||||
tops.insert(g[e].rose_top);
|
||||
}
|
||||
|
@@ -104,7 +104,7 @@ void runAnchoredTableStream(const struct RoseEngine *t, const void *atable,
|
||||
|
||||
|
||||
static really_inline
|
||||
void saveStreamState(const struct NFA *nfa, struct mq *q, s64a loc) {
|
||||
void saveStreamState(const struct NFA *nfa, const struct mq *q, s64a loc) {
|
||||
DEBUG_PRINTF("offset=%llu, length=%zu, hlength=%zu, loc=%lld\n",
|
||||
q->offset, q->length, q->hlength, loc);
|
||||
nfaQueueCompressState(nfa, q, loc);
|
||||
|
Reference in New Issue
Block a user