mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
Fix 'unqualified call to std::move' errors in clang 15+
This commit is contained in:
parent
4918f81ea3
commit
0d2f9ccbaa
@ -98,7 +98,7 @@ public:
|
||||
const FDREngineDescription &eng_in,
|
||||
bool make_small_in, const Grey &grey_in)
|
||||
: eng(eng_in), grey(grey_in), tab(eng_in.getTabSizeBytes()),
|
||||
lits(move(lits_in)), bucketToLits(move(bucketToLits_in)),
|
||||
lits(std::move(lits_in)), bucketToLits(std::move(bucketToLits_in)),
|
||||
make_small(make_small_in) {}
|
||||
|
||||
bytecode_ptr<FDR> build();
|
||||
@ -504,7 +504,7 @@ map<BucketIndex, vector<LiteralIndex>> assignStringsToBuckets(
|
||||
map<BucketIndex, vector<LiteralIndex>> bucketToLits;
|
||||
size_t bucketCnt = buckets.size();
|
||||
for (size_t i = 0; i < bucketCnt; i++) {
|
||||
bucketToLits.emplace(bucketCnt - i - 1, move(buckets[i]));
|
||||
bucketToLits.emplace(bucketCnt - i - 1, std::move(buckets[i]));
|
||||
}
|
||||
|
||||
return bucketToLits;
|
||||
@ -867,7 +867,7 @@ unique_ptr<HWLMProto> fdrBuildProtoInternal(u8 engType,
|
||||
auto bucketToLits = assignStringsToBuckets(lits, *des);
|
||||
addIncludedInfo(lits, des->getNumBuckets(), bucketToLits);
|
||||
auto proto =
|
||||
std::make_unique<HWLMProto>(engType, move(des), lits, bucketToLits,
|
||||
std::make_unique<HWLMProto>(engType, std::move(des), lits, bucketToLits,
|
||||
make_small);
|
||||
return proto;
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ setupFullConfs(const vector<hwlmLiteral> &lits,
|
||||
DEBUG_PRINTF("b %d sz %zu\n", b, vl.size());
|
||||
auto fc = getFDRConfirm(vl, make_small);
|
||||
totalConfirmSize += fc.size();
|
||||
bc2Conf.emplace(b, move(fc));
|
||||
bc2Conf.emplace(b, std::move(fc));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public:
|
||||
const TeddyEngineDescription &eng_in, bool make_small_in,
|
||||
const Grey &grey_in)
|
||||
: eng(eng_in), grey(grey_in), lits(lits_in),
|
||||
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
|
||||
bytecode_ptr<FDR> build();
|
||||
};
|
||||
@ -676,7 +676,7 @@ unique_ptr<HWLMProto> teddyBuildProtoHinted(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return std::make_unique<HWLMProto>(engType, move(des), lits,
|
||||
return std::make_unique<HWLMProto>(engType, std::move(des), lits,
|
||||
bucketToLits, make_small);
|
||||
}
|
||||
|
||||
|
@ -57,24 +57,24 @@ using namespace std;
|
||||
namespace ue2 {
|
||||
|
||||
HWLMProto::HWLMProto(u8 engType_in, vector<hwlmLiteral> lits_in)
|
||||
: engType(engType_in), lits(move(lits_in)) {}
|
||||
: engType(engType_in), lits(std::move(lits_in)) {}
|
||||
|
||||
HWLMProto::HWLMProto(u8 engType_in,
|
||||
unique_ptr<FDREngineDescription> eng_in,
|
||||
vector<hwlmLiteral> lits_in,
|
||||
map<u32, vector<u32>> bucketToLits_in,
|
||||
bool make_small_in)
|
||||
: engType(engType_in), fdrEng(move(eng_in)), lits(move(lits_in)),
|
||||
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
: engType(engType_in), fdrEng(std::move(eng_in)), lits(std::move(lits_in)),
|
||||
bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
|
||||
HWLMProto::HWLMProto(u8 engType_in,
|
||||
unique_ptr<TeddyEngineDescription> eng_in,
|
||||
vector<hwlmLiteral> lits_in,
|
||||
map<u32, vector<u32>> bucketToLits_in,
|
||||
bool make_small_in)
|
||||
: engType(engType_in), teddyEng(move(eng_in)),
|
||||
lits(move(lits_in)),
|
||||
bucketToLits(move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
: engType(engType_in), teddyEng(std::move(eng_in)),
|
||||
lits(std::move(lits_in)),
|
||||
bucketToLits(std::move(bucketToLits_in)), make_small(make_small_in) {}
|
||||
|
||||
HWLMProto::~HWLMProto() {}
|
||||
|
||||
@ -132,14 +132,14 @@ bytecode_ptr<HWLM> hwlmBuild(const HWLMProto &proto, const CompileContext &cc,
|
||||
if (noodle) {
|
||||
engSize = noodle.size();
|
||||
}
|
||||
eng = move(noodle);
|
||||
eng = std::move(noodle);
|
||||
} else {
|
||||
DEBUG_PRINTF("building a new deal\n");
|
||||
auto fdr = fdrBuildTable(proto, cc.grey);
|
||||
if (fdr) {
|
||||
engSize = fdr.size();
|
||||
}
|
||||
eng = move(fdr);
|
||||
eng = std::move(fdr);
|
||||
}
|
||||
|
||||
if (!eng) {
|
||||
|
@ -130,14 +130,14 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
|
||||
} else {
|
||||
path pp = append(p, CharReach(), p.dest);
|
||||
all[p.dest].emplace_back(pp);
|
||||
out.emplace_back(move(pp));
|
||||
out.emplace_back(std::move(pp));
|
||||
}
|
||||
}
|
||||
|
||||
if (!s.reports_eod.empty()) {
|
||||
path pp = append(p, CharReach(), p.dest);
|
||||
all[p.dest].emplace_back(pp);
|
||||
out.emplace_back(move(pp));
|
||||
out.emplace_back(std::move(pp));
|
||||
}
|
||||
|
||||
flat_map<u32, CharReach> dest;
|
||||
@ -157,7 +157,7 @@ void extend(const raw_dfa &rdfa, const vector<CharReach> &rev_map,
|
||||
DEBUG_PRINTF("----good: [%s] -> %u\n",
|
||||
describeClasses(pp.reach).c_str(), pp.dest);
|
||||
all[e.first].emplace_back(pp);
|
||||
out.emplace_back(move(pp));
|
||||
out.emplace_back(std::move(pp));
|
||||
}
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ vector<vector<CharReach>> generate_paths(const raw_dfa &rdfa,
|
||||
extend(rdfa, rev_map, p, all, next_gen);
|
||||
}
|
||||
|
||||
paths = move(next_gen);
|
||||
paths = std::move(next_gen);
|
||||
}
|
||||
|
||||
dump_paths(paths);
|
||||
|
@ -1299,7 +1299,7 @@ unique_ptr<raw_report_info> gough_build_strat::gatherReports(
|
||||
*arbReport = MO_INVALID_IDX;
|
||||
assert(!ri->rl.empty()); /* all components should be able to generate
|
||||
reports */
|
||||
return move(ri);
|
||||
return std::move(ri);
|
||||
}
|
||||
|
||||
u32 raw_gough_report_info_impl::getReportListSize() const {
|
||||
|
@ -1026,7 +1026,7 @@ u32 addReports(const flat_set<ReportID> &r, vector<ReportID> &reports,
|
||||
|
||||
u32 offset = verify_u32(reports.size());
|
||||
insert(&reports, reports.end(), my_reports);
|
||||
reports_cache.emplace(move(my_reports), offset);
|
||||
reports_cache.emplace(std::move(my_reports), offset);
|
||||
return offset;
|
||||
}
|
||||
|
||||
@ -1064,7 +1064,7 @@ void buildAcceptsList(const build_info &args, ReportListCache &reports_cache,
|
||||
a.reports = addReports(h[v].reports, reports, reports_cache);
|
||||
}
|
||||
a.squash = addSquashMask(args, v, squash);
|
||||
accepts.emplace_back(move(a));
|
||||
accepts.emplace_back(std::move(a));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1819,7 +1819,7 @@ struct Factory {
|
||||
*streamState += streamStateLen;
|
||||
*scratchStateSize += sizeof(RepeatControl);
|
||||
|
||||
out.emplace_back(move(info));
|
||||
out.emplace_back(std::move(info));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -462,7 +462,7 @@ unique_ptr<raw_report_info> mcclellan_build_strat::gatherReports(
|
||||
*isSingleReport = 0;
|
||||
}
|
||||
|
||||
return move(ri);
|
||||
return std::move(ri);
|
||||
}
|
||||
|
||||
u32 raw_report_info_impl::getReportListSize() const {
|
||||
|
@ -319,7 +319,7 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
|
||||
|
||||
queue<unique_ptr<raw_dfa>> q;
|
||||
for (auto &dfa : dfas) {
|
||||
q.push(move(dfa));
|
||||
q.push(std::move(dfa));
|
||||
}
|
||||
|
||||
// All DFAs are now on the queue, so we'll clear the vector and use it for
|
||||
@ -328,30 +328,30 @@ void mergeDfas(vector<unique_ptr<raw_dfa>> &dfas, size_t max_states,
|
||||
|
||||
while (q.size() > 1) {
|
||||
// Attempt to merge the two front elements of the queue.
|
||||
unique_ptr<raw_dfa> d1 = move(q.front());
|
||||
unique_ptr<raw_dfa> d1 = std::move(q.front());
|
||||
q.pop();
|
||||
unique_ptr<raw_dfa> d2 = move(q.front());
|
||||
unique_ptr<raw_dfa> d2 = std::move(q.front());
|
||||
q.pop();
|
||||
|
||||
auto rdfa = mergeTwoDfas(d1.get(), d2.get(), max_states, rm, grey);
|
||||
if (rdfa) {
|
||||
q.push(move(rdfa));
|
||||
q.push(std::move(rdfa));
|
||||
} else {
|
||||
DEBUG_PRINTF("failed to merge\n");
|
||||
// Put the larger of the two DFAs on the output list, retain the
|
||||
// smaller one on the queue for further merge attempts.
|
||||
if (d2->states.size() > d1->states.size()) {
|
||||
dfas.emplace_back(move(d2));
|
||||
q.push(move(d1));
|
||||
dfas.emplace_back(std::move(d2));
|
||||
q.push(std::move(d1));
|
||||
} else {
|
||||
dfas.emplace_back(move(d1));
|
||||
q.push(move(d2));
|
||||
dfas.emplace_back(std::move(d1));
|
||||
q.push(std::move(d2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
while (!q.empty()) {
|
||||
dfas.emplace_back(move(q.front()));
|
||||
dfas.emplace_back(std::move(q.front()));
|
||||
q.pop();
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ unique_ptr<raw_report_info> sheng_build_strat::gatherReports(
|
||||
*isSingleReport = 0;
|
||||
}
|
||||
|
||||
return move(ri);
|
||||
return std::move(ri);
|
||||
}
|
||||
|
||||
u32 sheng_build_strat::max_allowed_offset_accel() const {
|
||||
|
@ -162,7 +162,7 @@ BuiltExpression NFABuilderImpl::getGraph() {
|
||||
throw CompileError("Pattern too large.");
|
||||
}
|
||||
|
||||
return { expr, move(graph) };
|
||||
return { expr, std::move(graph) };
|
||||
}
|
||||
|
||||
void NFABuilderImpl::setNodeReportID(Position pos, int offsetAdjust) {
|
||||
|
@ -369,7 +369,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
|
||||
pruneUseless(*gc);
|
||||
DEBUG_PRINTF("component %zu has %zu vertices\n", comps.size(),
|
||||
num_vertices(*gc));
|
||||
comps.emplace_back(move(gc));
|
||||
comps.emplace_back(std::move(gc));
|
||||
}
|
||||
|
||||
// Another component to handle the direct shell-to-shell edges.
|
||||
@ -385,7 +385,7 @@ void splitIntoComponents(unique_ptr<NGHolder> g,
|
||||
pruneUseless(*gc);
|
||||
DEBUG_PRINTF("shell edge component %zu has %zu vertices\n",
|
||||
comps.size(), num_vertices(*gc));
|
||||
comps.emplace_back(move(gc));
|
||||
comps.emplace_back(std::move(gc));
|
||||
*shell_comp = true;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ vector<VertexInfoSet> partitionGraph(vector<unique_ptr<VertexInfo>> &infos,
|
||||
unsigned eq_class = classes.size();
|
||||
vi->equivalence_class = eq_class;
|
||||
classes.push_back({vi.get()});
|
||||
classinfomap.emplace(move(ci), eq_class);
|
||||
classinfomap.emplace(std::move(ci), eq_class);
|
||||
} else {
|
||||
// vertex is added to an existing class.
|
||||
unsigned eq_class = ii->second;
|
||||
@ -441,7 +441,7 @@ void equivalence(vector<VertexInfoSet> &classes, WorkQueue &work_queue,
|
||||
classes[cur_class].erase(vi);
|
||||
new_class_vertices.insert(vi);
|
||||
}
|
||||
classes.emplace_back(move(new_class_vertices));
|
||||
classes.emplace_back(std::move(new_class_vertices));
|
||||
|
||||
if (contains(tmi->first, cur_class)) {
|
||||
reval_queue.push(new_class);
|
||||
|
@ -254,7 +254,7 @@ void findBestInternal(vector<vector<CharReach>>::const_iterator pb,
|
||||
DEBUG_PRINTF("worse\n");
|
||||
continue;
|
||||
}
|
||||
priority_path.emplace_back(move(as));
|
||||
priority_path.emplace_back(std::move(as));
|
||||
}
|
||||
|
||||
sort(priority_path.begin(), priority_path.end());
|
||||
@ -422,7 +422,7 @@ void findDoubleBest(vector<vector<CharReach> >::const_iterator pb,
|
||||
DEBUG_PRINTF("worse\n");
|
||||
continue;
|
||||
}
|
||||
priority_path.emplace_back(move(as));
|
||||
priority_path.emplace_back(std::move(as));
|
||||
}
|
||||
|
||||
sort(priority_path.begin(), priority_path.end());
|
||||
@ -569,7 +569,7 @@ AccelScheme findBestAccelScheme(vector<vector<CharReach>> paths,
|
||||
DAccelScheme da = findBestDoubleAccelScheme(paths, terminating);
|
||||
if (da.double_byte.size() <= DOUBLE_SHUFTI_LIMIT) {
|
||||
rv.double_byte = std::move(da.double_byte);
|
||||
rv.double_cr = move(da.double_cr);
|
||||
rv.double_cr = std::move(da.double_cr);
|
||||
rv.double_offset = da.double_offset;
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ namespace {
|
||||
|
||||
struct LitGraphVertexProps {
|
||||
LitGraphVertexProps() = default;
|
||||
explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(move(c_in)) {}
|
||||
explicit LitGraphVertexProps(ue2_literal::elem c_in) : c(std::move(c_in)) {}
|
||||
ue2_literal::elem c; // string element (char + bool)
|
||||
size_t index = 0; // managed by ue2_graph
|
||||
};
|
||||
|
@ -237,7 +237,7 @@ bool handleDecoratedLiterals(RoseBuild &rose, const NGHolder &g,
|
||||
DEBUG_PRINTF("failed validation\n");
|
||||
return false;
|
||||
}
|
||||
masks.emplace_back(move(pm));
|
||||
masks.emplace_back(std::move(pm));
|
||||
}
|
||||
|
||||
for (const auto &pm : masks) {
|
||||
|
@ -100,7 +100,7 @@ void checkAndAddExitCandidate(const AcyclicGraph &g,
|
||||
|
||||
if (!open.empty()) {
|
||||
DEBUG_PRINTF("exit %zu\n", g[v].index);
|
||||
exits.emplace_back(move(v_exit));
|
||||
exits.emplace_back(std::move(v_exit));
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ void buildInitialCandidate(const AcyclicGraph &g,
|
||||
|
||||
if (it != ite) {
|
||||
enters.erase(*it);
|
||||
open_jumps = move(enters);
|
||||
open_jumps = std::move(enters);
|
||||
DEBUG_PRINTF("oj size = %zu\n", open_jumps.size());
|
||||
++it;
|
||||
} else {
|
||||
|
@ -1733,7 +1733,7 @@ void clearProperInEdges(NGHolder &g, const NFAVertex sink) {
|
||||
namespace {
|
||||
struct SomRevNfa {
|
||||
SomRevNfa(NFAVertex s, ReportID r, bytecode_ptr<NFA> n)
|
||||
: sink(s), report(r), nfa(move(n)) {}
|
||||
: sink(s), report(r), nfa(std::move(n)) {}
|
||||
NFAVertex sink;
|
||||
ReportID report;
|
||||
bytecode_ptr<NFA> nfa;
|
||||
@ -1799,7 +1799,7 @@ bool makeSomRevNfa(vector<SomRevNfa> &som_nfas, const NGHolder &g,
|
||||
return false;
|
||||
}
|
||||
|
||||
som_nfas.emplace_back(sink, report, move(nfa));
|
||||
som_nfas.emplace_back(sink, report, std::move(nfa));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1839,7 +1839,7 @@ bool doSomRevNfa(NG &ng, NGHolder &g, const CompileContext &cc) {
|
||||
assert(som_nfa.nfa);
|
||||
|
||||
// Transfer ownership of the NFA to the SOM slot manager.
|
||||
u32 comp_id = ng.ssm.addRevNfa(move(som_nfa.nfa), maxWidth);
|
||||
u32 comp_id = ng.ssm.addRevNfa(std::move(som_nfa.nfa), maxWidth);
|
||||
|
||||
// Replace this report on 'g' with a SOM_REV_NFA report pointing at our
|
||||
// new component.
|
||||
@ -1872,7 +1872,7 @@ u32 doSomRevNfaPrefix(NG &ng, const ExpressionInfo &expr, NGHolder &g,
|
||||
max(cc.grey.maxHistoryAvailable, ng.maxSomRevHistoryAvailable));
|
||||
}
|
||||
|
||||
return ng.ssm.addRevNfa(move(nfa), maxWidth);
|
||||
return ng.ssm.addRevNfa(std::move(nfa), maxWidth);
|
||||
}
|
||||
|
||||
static
|
||||
|
@ -394,7 +394,7 @@ void getSimpleRoseLiterals(const NGHolder &g, bool seeking_anchored,
|
||||
|
||||
lits->reserve(lit_info.size());
|
||||
for (auto &m : lit_info) {
|
||||
lits->emplace_back(move(m.second));
|
||||
lits->emplace_back(std::move(m.second));
|
||||
}
|
||||
DEBUG_PRINTF("%zu candidate literal sets\n", lits->size());
|
||||
}
|
||||
@ -707,11 +707,11 @@ unique_ptr<VertLitInfo> findBestSplit(const NGHolder &g,
|
||||
auto cmp = LitComparator(g, seeking_anchored, seeking_transient,
|
||||
last_chance);
|
||||
|
||||
unique_ptr<VertLitInfo> best = move(lits.back());
|
||||
unique_ptr<VertLitInfo> best = std::move(lits.back());
|
||||
lits.pop_back();
|
||||
while (!lits.empty()) {
|
||||
if (cmp(best, lits.back())) {
|
||||
best = move(lits.back());
|
||||
best = std::move(lits.back());
|
||||
}
|
||||
lits.pop_back();
|
||||
}
|
||||
@ -1621,7 +1621,7 @@ void removeRedundantLiteralsFromPrefixes(RoseInGraph &g,
|
||||
if (delay && delay != MO_INVALID_IDX) {
|
||||
DEBUG_PRINTF("setting delay %u on lhs %p\n", delay, h.get());
|
||||
|
||||
g[e].graph = move(h);
|
||||
g[e].graph = std::move(h);
|
||||
g[e].graph_lag = delay;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ void ComponentAlternation::accept(ConstComponentVisitor &v) const {
|
||||
}
|
||||
|
||||
void ComponentAlternation::append(unique_ptr<Component> component) {
|
||||
children.emplace_back(move(component));
|
||||
children.emplace_back(std::move(component));
|
||||
}
|
||||
|
||||
vector<PositionInfo> ComponentAlternation::first() const {
|
||||
|
@ -50,7 +50,7 @@ ComponentCondReference::ComponentCondReference(const string &name)
|
||||
: kind(CONDITION_NAME), ref_id(0), ref_name(name), hasBothBranches(false) {}
|
||||
|
||||
ComponentCondReference::ComponentCondReference(unique_ptr<Component> c)
|
||||
: kind(CONDITION_ASSERTION), ref_id(0), assertion(move(c)),
|
||||
: kind(CONDITION_ASSERTION), ref_id(0), assertion(std::move(c)),
|
||||
hasBothBranches(false) {}
|
||||
|
||||
ComponentCondReference::~ComponentCondReference() {}
|
||||
|
@ -60,7 +60,7 @@ static constexpr u32 MAX_POSITIONS_EXPANDED = 500000; // arbitrarily huge
|
||||
* extent is effectively zero. */
|
||||
ComponentRepeat::ComponentRepeat(unique_ptr<Component> sub_comp_in, u32 min,
|
||||
u32 max, enum RepeatType t)
|
||||
: type(t), sub_comp(move(sub_comp_in)), m_min(min), m_max(max),
|
||||
: type(t), sub_comp(std::move(sub_comp_in)), m_min(min), m_max(max),
|
||||
posFirst(GlushkovBuildState::POS_UNINITIALIZED),
|
||||
posLast(GlushkovBuildState::POS_UNINITIALIZED) {
|
||||
assert(sub_comp);
|
||||
@ -361,7 +361,7 @@ void ComponentRepeat::postSubNotePositionHook() {
|
||||
unique_ptr<ComponentRepeat> makeComponentRepeat(unique_ptr<Component> sub_comp,
|
||||
u32 min, u32 max,
|
||||
ComponentRepeat::RepeatType t) {
|
||||
return std::make_unique<ComponentRepeat>(move(sub_comp), min, max, t);
|
||||
return std::make_unique<ComponentRepeat>(std::move(sub_comp), min, max, t);
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
@ -116,7 +116,7 @@ void ComponentSequence::accept(ConstComponentVisitor &v) const {
|
||||
}
|
||||
|
||||
void ComponentSequence::addComponent(unique_ptr<Component> comp) {
|
||||
children.emplace_back(move(comp));
|
||||
children.emplace_back(std::move(comp));
|
||||
}
|
||||
|
||||
bool ComponentSequence::addRepeat(u32 min, u32 max,
|
||||
@ -131,7 +131,7 @@ bool ComponentSequence::addRepeat(u32 min, u32 max,
|
||||
return false;
|
||||
}
|
||||
|
||||
children.back() = makeComponentRepeat(move(children.back()), min, max,
|
||||
children.back() = makeComponentRepeat(std::move(children.back()), min, max,
|
||||
type);
|
||||
assert(children.back());
|
||||
return true;
|
||||
@ -144,14 +144,14 @@ void ComponentSequence::addAlternation() {
|
||||
|
||||
auto seq = std::make_unique<ComponentSequence>();
|
||||
seq->children.swap(children);
|
||||
alternation->append(move(seq));
|
||||
alternation->append(std::move(seq));
|
||||
}
|
||||
|
||||
void ComponentSequence::finalize() {
|
||||
if (alternation) {
|
||||
addAlternation();
|
||||
assert(children.empty());
|
||||
children.emplace_back(move(alternation));
|
||||
children.emplace_back(std::move(alternation));
|
||||
alternation = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ ComponentSequence *enterSequence(ComponentSequence *parent,
|
||||
assert(child);
|
||||
|
||||
ComponentSequence *seq = child.get();
|
||||
parent->addComponent(move(child));
|
||||
parent->addComponent(std::move(child));
|
||||
return seq;
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ void addLiteral(ComponentSequence *currentSeq, char c, const ParseMode &mode) {
|
||||
assert(cc);
|
||||
cc->add(c);
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
} else {
|
||||
currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless));
|
||||
}
|
||||
@ -190,7 +190,7 @@ void addEscaped(ComponentSequence *currentSeq, unichar accum,
|
||||
assert(cc);
|
||||
cc->add(accum);
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
} else {
|
||||
if (accum > 255) {
|
||||
throw LocatedParseError(err_msg);
|
||||
@ -330,7 +330,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
PUSH_SEQUENCE;
|
||||
auto seq = std::make_unique<ComponentSequence>();
|
||||
seq->setCaptureIndex(groupIndex++);
|
||||
currentSeq = enterSequence(currentSeq, move(seq));
|
||||
currentSeq = enterSequence(currentSeq, std::move(seq));
|
||||
}
|
||||
|
||||
# enter a NAMED CAPTURING group ( e.g. (?'<hatstand>blah) )
|
||||
@ -347,7 +347,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto seq = std::make_unique<ComponentSequence>();
|
||||
seq->setCaptureIndex(groupIndex++);
|
||||
seq->setCaptureName(label);
|
||||
currentSeq = enterSequence(currentSeq, move(seq));
|
||||
currentSeq = enterSequence(currentSeq, std::move(seq));
|
||||
}
|
||||
|
||||
# enter a NON-CAPTURING group where we're modifying flags
|
||||
@ -724,7 +724,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
([^^] ${ fhold; fcall readUCP; })
|
||||
'}' ${ if (!inCharClass) { // not inside [..]
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
})
|
||||
@ -735,7 +735,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_C, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -743,7 +743,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_L, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -751,7 +751,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_M, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -759,7 +759,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_N, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -767,7 +767,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_P, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -775,7 +775,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_S, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -783,7 +783,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
currentCls->add(CLASS_UCP_Z, negated);
|
||||
if (!inCharClass) {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
}
|
||||
fret;
|
||||
};
|
||||
@ -1106,7 +1106,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
|
||||
']' => {
|
||||
currentCls->finalize();
|
||||
currentSeq->addComponent(move(currentCls));
|
||||
currentSeq->addComponent(std::move(currentCls));
|
||||
inCharClass = false;
|
||||
fgoto main;
|
||||
};
|
||||
@ -1163,7 +1163,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint2c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
utf8_3c when is_utf8 => {
|
||||
@ -1172,7 +1172,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint3c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
utf8_4c when is_utf8 => {
|
||||
@ -1181,7 +1181,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint4c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
hi_byte when is_utf8 => {
|
||||
@ -1618,52 +1618,52 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
# Word character
|
||||
'\\w' => {
|
||||
auto cc = generateComponent(CLASS_WORD, false, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Non word character
|
||||
'\\W' => {
|
||||
auto cc = generateComponent(CLASS_WORD, true, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Whitespace character
|
||||
'\\s' => {
|
||||
auto cc = generateComponent(CLASS_SPACE, false, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Non whitespace character
|
||||
'\\S' => {
|
||||
auto cc = generateComponent(CLASS_SPACE, true, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Digit character
|
||||
'\\d' => {
|
||||
auto cc = generateComponent(CLASS_DIGIT, false, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Non digit character
|
||||
'\\D' => {
|
||||
auto cc = generateComponent(CLASS_DIGIT, true, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Horizontal whitespace
|
||||
'\\h' => {
|
||||
auto cc = generateComponent(CLASS_HORZ, false, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Not horizontal whitespace
|
||||
'\\H' => {
|
||||
auto cc = generateComponent(CLASS_HORZ, true, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Vertical whitespace
|
||||
'\\v' => {
|
||||
auto cc = generateComponent(CLASS_VERT, false, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
# Not vertical whitespace
|
||||
'\\V' => {
|
||||
auto cc = generateComponent(CLASS_VERT, true, mode);
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
'\\p{' => {
|
||||
@ -1787,7 +1787,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
ComponentAssertion *a_seq = a.get();
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = enterSequence(currentSeq,
|
||||
std::make_unique<ComponentCondReference>(move(a)));
|
||||
std::make_unique<ComponentCondReference>(std::move(a)));
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = a_seq;
|
||||
};
|
||||
@ -1798,7 +1798,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
ComponentAssertion *a_seq = a.get();
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = enterSequence(currentSeq,
|
||||
std::make_unique<ComponentCondReference>(move(a)));
|
||||
std::make_unique<ComponentCondReference>(std::move(a)));
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = a_seq;
|
||||
};
|
||||
@ -1809,7 +1809,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
ComponentAssertion *a_seq = a.get();
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = enterSequence(currentSeq,
|
||||
std::make_unique<ComponentCondReference>(move(a)));
|
||||
std::make_unique<ComponentCondReference>(std::move(a)));
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = a_seq;
|
||||
};
|
||||
@ -1820,7 +1820,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
ComponentAssertion *a_seq = a.get();
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = enterSequence(currentSeq,
|
||||
std::make_unique<ComponentCondReference>(move(a)));
|
||||
std::make_unique<ComponentCondReference>(std::move(a)));
|
||||
PUSH_SEQUENCE;
|
||||
currentSeq = a_seq;
|
||||
};
|
||||
@ -1861,7 +1861,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint2c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
utf8_3c when is_utf8 => {
|
||||
@ -1870,7 +1870,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint3c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
utf8_4c when is_utf8 => {
|
||||
@ -1879,7 +1879,7 @@ unichar readUtf8CodePoint4c(const char *s) {
|
||||
auto cc = getComponentClass(mode);
|
||||
cc->add(readUtf8CodePoint4c(ts));
|
||||
cc->finalize();
|
||||
currentSeq->addComponent(move(cc));
|
||||
currentSeq->addComponent(std::move(cc));
|
||||
};
|
||||
|
||||
hi_byte when is_utf8 => {
|
||||
@ -2024,7 +2024,7 @@ unique_ptr<Component> parse(const char *ptr, ParseMode &globalMode) {
|
||||
// Ensure that all references are valid.
|
||||
checkReferences(*rootSeq, groupIndex, groupNames);
|
||||
|
||||
return move(rootSeq);
|
||||
return std::move(rootSeq);
|
||||
} catch (LocatedParseError &error) {
|
||||
if (ts >= ptr && ts <= pe) {
|
||||
error.locate(ts - ptr);
|
||||
|
@ -1780,7 +1780,7 @@ bool RoseBuildImpl::addOutfix(const NGHolder &h) {
|
||||
}
|
||||
|
||||
if (rdfa) {
|
||||
outfixes.emplace_back(OutfixInfo(move(rdfa)));
|
||||
outfixes.emplace_back(OutfixInfo(std::move(rdfa)));
|
||||
} else {
|
||||
outfixes.emplace_back(OutfixInfo(cloneHolder(h)));
|
||||
}
|
||||
|
@ -144,9 +144,9 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
|
||||
for (auto &rdfa : dfas) {
|
||||
u32 start_size = mcclellanStartReachSize(rdfa.get());
|
||||
if (start_size <= MAX_SMALL_START_REACH) {
|
||||
small_starts.emplace_back(move(rdfa));
|
||||
small_starts.emplace_back(std::move(rdfa));
|
||||
} else {
|
||||
big_starts.emplace_back(move(rdfa));
|
||||
big_starts.emplace_back(std::move(rdfa));
|
||||
}
|
||||
}
|
||||
dfas.clear();
|
||||
@ -158,10 +158,10 @@ void mergeAnchoredDfas(vector<unique_ptr<raw_dfa>> &dfas,
|
||||
|
||||
// Rehome our groups into one vector.
|
||||
for (auto &rdfa : small_starts) {
|
||||
dfas.emplace_back(move(rdfa));
|
||||
dfas.emplace_back(std::move(rdfa));
|
||||
}
|
||||
for (auto &rdfa : big_starts) {
|
||||
dfas.emplace_back(move(rdfa));
|
||||
dfas.emplace_back(std::move(rdfa));
|
||||
}
|
||||
|
||||
// Final test: if we've built two DFAs here that are small enough, we can
|
||||
@ -685,7 +685,7 @@ int finalise_out(RoseBuildImpl &build, const NGHolder &h,
|
||||
if (check_dupe(*out_dfa, build.anchored_nfas[hash], remap)) {
|
||||
return ANCHORED_REMAP;
|
||||
}
|
||||
build.anchored_nfas[hash].emplace_back(move(out_dfa));
|
||||
build.anchored_nfas[hash].emplace_back(std::move(out_dfa));
|
||||
return ANCHORED_SUCCESS;
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ int addAutomaton(RoseBuildImpl &build, const NGHolder &h, ReportID *remap) {
|
||||
|
||||
auto out_dfa = std::make_unique<raw_dfa>(NFA_OUTFIX_RAW);
|
||||
if (determinise(autom, out_dfa->states, MAX_DFA_STATES)) {
|
||||
return finalise_out(build, h, autom, move(out_dfa), remap);
|
||||
return finalise_out(build, h, autom, std::move(out_dfa), remap);
|
||||
}
|
||||
|
||||
DEBUG_PRINTF("determinise failed\n");
|
||||
@ -767,7 +767,7 @@ void buildSimpleDfas(const RoseBuildImpl &build, const vector<u32> &frag_map,
|
||||
rdfa->start_floating = DEAD_STATE;
|
||||
rdfa->alpha_size = autom.alphasize;
|
||||
rdfa->alpha_remap = autom.alpha;
|
||||
anchored_dfas->emplace_back(move(rdfa));
|
||||
anchored_dfas->emplace_back(std::move(rdfa));
|
||||
}
|
||||
}
|
||||
|
||||
@ -784,7 +784,7 @@ vector<unique_ptr<raw_dfa>> getAnchoredDfas(RoseBuildImpl &build,
|
||||
// DFAs that already exist as raw_dfas.
|
||||
for (auto &anch_dfas : build.anchored_nfas) {
|
||||
for (auto &rdfa : anch_dfas.second) {
|
||||
dfas.emplace_back(move(rdfa));
|
||||
dfas.emplace_back(std::move(rdfa));
|
||||
}
|
||||
}
|
||||
build.anchored_nfas.clear();
|
||||
@ -834,7 +834,7 @@ size_t buildNfas(vector<raw_dfa> &anchored_dfas,
|
||||
|
||||
assert(nfa->length);
|
||||
total_size += ROUNDUP_CL(sizeof(anchored_matcher_info) + nfa->length);
|
||||
nfas->emplace_back(move(nfa));
|
||||
nfas->emplace_back(std::move(nfa));
|
||||
}
|
||||
|
||||
// We no longer need to keep the raw_dfa structures around.
|
||||
@ -861,7 +861,7 @@ vector<raw_dfa> buildAnchoredDfas(RoseBuildImpl &build,
|
||||
dfas.reserve(anch_dfas.size());
|
||||
for (auto &rdfa : anch_dfas) {
|
||||
assert(rdfa);
|
||||
dfas.emplace_back(move(*rdfa));
|
||||
dfas.emplace_back(std::move(*rdfa));
|
||||
}
|
||||
return dfas;
|
||||
}
|
||||
|
@ -701,9 +701,9 @@ buildSuffix(const ReportManager &rm, const SomSlotManager &ssm,
|
||||
auto d = getDfa(*rdfa, false, cc, rm);
|
||||
assert(d);
|
||||
if (cc.grey.roseMcClellanSuffix != 2) {
|
||||
n = pickImpl(move(d), move(n), fast_nfa);
|
||||
n = pickImpl(std::move(d), std::move(n), fast_nfa);
|
||||
} else {
|
||||
n = move(d);
|
||||
n = std::move(d);
|
||||
}
|
||||
|
||||
assert(n);
|
||||
@ -853,7 +853,7 @@ bytecode_ptr<NFA> makeLeftNfa(const RoseBuildImpl &tbi, left_id &left,
|
||||
if (rdfa) {
|
||||
auto d = getDfa(*rdfa, is_transient, cc, rm);
|
||||
assert(d);
|
||||
n = pickImpl(move(d), move(n), fast_nfa);
|
||||
n = pickImpl(std::move(d), std::move(n), fast_nfa);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1422,12 +1422,12 @@ void buildExclusiveInfixes(RoseBuildImpl &build, build_context &bc,
|
||||
setLeftNfaProperties(*n, leftfix);
|
||||
|
||||
ExclusiveSubengine engine;
|
||||
engine.nfa = move(n);
|
||||
engine.nfa = std::move(n);
|
||||
engine.vertices = verts;
|
||||
info.subengines.emplace_back(move(engine));
|
||||
info.subengines.emplace_back(std::move(engine));
|
||||
}
|
||||
info.queue = qif.get_queue();
|
||||
exclusive_info.emplace_back(move(info));
|
||||
exclusive_info.emplace_back(std::move(info));
|
||||
}
|
||||
updateExclusiveInfixProperties(build, exclusive_info, bc.leftfix_info,
|
||||
no_retrigger_queues);
|
||||
@ -1649,7 +1649,7 @@ public:
|
||||
if (rdfa) {
|
||||
auto d = getDfa(*rdfa, false, cc, rm);
|
||||
if (d) {
|
||||
n = pickImpl(move(d), move(n), fast_nfa);
|
||||
n = pickImpl(std::move(d), std::move(n), fast_nfa);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1864,15 +1864,15 @@ void buildExclusiveSuffixes(RoseBuildImpl &build, build_context &bc,
|
||||
setSuffixProperties(*n, s, build.rm);
|
||||
|
||||
ExclusiveSubengine engine;
|
||||
engine.nfa = move(n);
|
||||
engine.nfa = std::move(n);
|
||||
engine.vertices = verts;
|
||||
info.subengines.emplace_back(move(engine));
|
||||
info.subengines.emplace_back(std::move(engine));
|
||||
|
||||
const auto &reports = all_reports(s);
|
||||
info.reports.insert(reports.begin(), reports.end());
|
||||
}
|
||||
info.queue = qif.get_queue();
|
||||
exclusive_info.emplace_back(move(info));
|
||||
exclusive_info.emplace_back(std::move(info));
|
||||
}
|
||||
updateExclusiveSuffixProperties(build, exclusive_info,
|
||||
no_retrigger_queues);
|
||||
@ -2416,7 +2416,7 @@ u32 writeProgram(build_context &bc, RoseProgram &&program) {
|
||||
u32 offset = bc.engine_blob.add(prog_bytecode);
|
||||
DEBUG_PRINTF("prog len %zu written at offset %u\n", prog_bytecode.size(),
|
||||
offset);
|
||||
bc.program_cache.emplace(move(program), offset);
|
||||
bc.program_cache.emplace(std::move(program), offset);
|
||||
return offset;
|
||||
}
|
||||
|
||||
@ -2581,13 +2581,13 @@ void makeBoundaryPrograms(const RoseBuildImpl &build, build_context &bc,
|
||||
DEBUG_PRINTF("report ^$: %zu\n", dboundary.report_at_0_eod_full.size());
|
||||
|
||||
auto eod_prog = makeBoundaryProgram(build, boundary.report_at_eod);
|
||||
out.reportEodOffset = writeProgram(bc, move(eod_prog));
|
||||
out.reportEodOffset = writeProgram(bc, std::move(eod_prog));
|
||||
|
||||
auto zero_prog = makeBoundaryProgram(build, boundary.report_at_0);
|
||||
out.reportZeroOffset = writeProgram(bc, move(zero_prog));
|
||||
out.reportZeroOffset = writeProgram(bc, std::move(zero_prog));
|
||||
|
||||
auto zeod_prog = makeBoundaryProgram(build, dboundary.report_at_0_eod_full);
|
||||
out.reportZeroEodOffset = writeProgram(bc, move(zeod_prog));
|
||||
out.reportZeroEodOffset = writeProgram(bc, std::move(zeod_prog));
|
||||
}
|
||||
|
||||
static
|
||||
@ -2752,10 +2752,10 @@ RoseProgram makeFragmentProgram(const RoseBuildImpl &build, build_context &bc,
|
||||
for (const auto &lit_id : lit_ids) {
|
||||
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
|
||||
lit_edge_map, false);
|
||||
blocks.emplace_back(move(prog));
|
||||
blocks.emplace_back(std::move(prog));
|
||||
}
|
||||
|
||||
return assembleProgramBlocks(move(blocks));
|
||||
return assembleProgramBlocks(std::move(blocks));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2865,7 +2865,7 @@ vector<LitFragment> groupByFragment(const RoseBuildImpl &build) {
|
||||
auto &fi = m.second;
|
||||
DEBUG_PRINTF("frag %s -> ids: %s\n", dumpString(m.first.s).c_str(),
|
||||
as_string_list(fi.lit_ids).c_str());
|
||||
fragments.emplace_back(frag_id, lit.s, fi.groups, move(fi.lit_ids));
|
||||
fragments.emplace_back(frag_id, lit.s, fi.groups, std::move(fi.lit_ids));
|
||||
frag_id++;
|
||||
assert(frag_id == fragments.size());
|
||||
}
|
||||
@ -2981,7 +2981,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
|
||||
child_offset);
|
||||
addIncludedJumpProgram(lit_prog, child_offset, pfrag.squash);
|
||||
}
|
||||
pfrag.lit_program_offset = writeProgram(bc, move(lit_prog));
|
||||
pfrag.lit_program_offset = writeProgram(bc, std::move(lit_prog));
|
||||
|
||||
// We only do delayed rebuild in streaming mode.
|
||||
if (!build.cc.streaming) {
|
||||
@ -3001,7 +3001,7 @@ void buildFragmentPrograms(const RoseBuildImpl &build,
|
||||
addIncludedJumpProgram(rebuild_prog, child_offset,
|
||||
pfrag.delay_squash);
|
||||
}
|
||||
pfrag.delay_program_offset = writeProgram(bc, move(rebuild_prog));
|
||||
pfrag.delay_program_offset = writeProgram(bc, std::move(rebuild_prog));
|
||||
}
|
||||
}
|
||||
|
||||
@ -3090,7 +3090,7 @@ pair<u32, u32> writeDelayPrograms(const RoseBuildImpl &build,
|
||||
auto prog = makeLiteralProgram(build, bc, prog_build,
|
||||
delayed_lit_id, lit_edge_map,
|
||||
false);
|
||||
u32 offset = writeProgram(bc, move(prog));
|
||||
u32 offset = writeProgram(bc, std::move(prog));
|
||||
|
||||
u32 delay_id;
|
||||
auto it = cache.find(offset);
|
||||
@ -3150,7 +3150,7 @@ pair<u32, u32> writeAnchoredPrograms(const RoseBuildImpl &build,
|
||||
|
||||
auto prog = makeLiteralProgram(build, bc, prog_build, lit_id,
|
||||
lit_edge_map, true);
|
||||
u32 offset = writeProgram(bc, move(prog));
|
||||
u32 offset = writeProgram(bc, std::move(prog));
|
||||
DEBUG_PRINTF("lit_id=%u -> anch prog at %u\n", lit_id, offset);
|
||||
|
||||
u32 anch_id;
|
||||
@ -3210,7 +3210,7 @@ pair<u32, u32> buildReportPrograms(const RoseBuildImpl &build,
|
||||
|
||||
for (ReportID id : reports) {
|
||||
auto program = makeReportProgram(build, bc.needs_mpv_catchup, id);
|
||||
u32 offset = writeProgram(bc, move(program));
|
||||
u32 offset = writeProgram(bc, std::move(program));
|
||||
programs.emplace_back(offset);
|
||||
build.rm.setProgramOffset(id, offset);
|
||||
DEBUG_PRINTF("program for report %u @ %u (%zu instructions)\n", id,
|
||||
@ -3326,7 +3326,7 @@ void addEodEventProgram(const RoseBuildImpl &build, build_context &bc,
|
||||
bc.roleStateIndices, prog_build,
|
||||
build.eod_event_literal_id, edge_list,
|
||||
false);
|
||||
program.add_block(move(block));
|
||||
program.add_block(std::move(block));
|
||||
}
|
||||
|
||||
static
|
||||
@ -3715,7 +3715,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
|
||||
drproto.get(), eproto.get(), sbproto.get());
|
||||
|
||||
auto eod_prog = makeEodProgram(*this, bc, prog_build, eodNfaIterOffset);
|
||||
proto.eodProgramOffset = writeProgram(bc, move(eod_prog));
|
||||
proto.eodProgramOffset = writeProgram(bc, std::move(eod_prog));
|
||||
|
||||
size_t longLitStreamStateRequired = 0;
|
||||
proto.longLitTableOffset
|
||||
@ -3734,11 +3734,11 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
|
||||
writeLogicalInfo(rm, bc.engine_blob, proto);
|
||||
|
||||
auto flushComb_prog = makeFlushCombProgram(proto);
|
||||
proto.flushCombProgramOffset = writeProgram(bc, move(flushComb_prog));
|
||||
proto.flushCombProgramOffset = writeProgram(bc, std::move(flushComb_prog));
|
||||
|
||||
auto lastFlushComb_prog = makeLastFlushCombProgram(proto);
|
||||
proto.lastFlushCombProgramOffset =
|
||||
writeProgram(bc, move(lastFlushComb_prog));
|
||||
writeProgram(bc, std::move(lastFlushComb_prog));
|
||||
|
||||
// Build anchored matcher.
|
||||
auto atable = buildAnchoredMatcher(*this, fragments, anchored_dfas);
|
||||
@ -3882,7 +3882,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildFinalEngine(u32 minWidth) {
|
||||
bc.engine_blob.write_bytes(engine.get());
|
||||
|
||||
// Add a small write engine if appropriate.
|
||||
engine = addSmallWriteEngine(*this, bc.resources, move(engine));
|
||||
engine = addSmallWriteEngine(*this, bc.resources, std::move(engine));
|
||||
|
||||
DEBUG_PRINTF("rose done %p\n", engine.get());
|
||||
|
||||
|
@ -1782,7 +1782,7 @@ bytecode_ptr<RoseEngine> RoseBuildImpl::buildRose(u32 minWidth) {
|
||||
|
||||
/* transfer mpv outfix to main queue */
|
||||
if (mpv_outfix) {
|
||||
outfixes.emplace_back(move(*mpv_outfix));
|
||||
outfixes.emplace_back(std::move(*mpv_outfix));
|
||||
mpv_outfix = nullptr;
|
||||
}
|
||||
|
||||
|
@ -212,7 +212,7 @@ void convertFloodProneSuffix(RoseBuildImpl &tbi, RoseVertex v, u32 lit_id,
|
||||
|
||||
// Apply the NFA.
|
||||
assert(!g[v].suffix);
|
||||
g[v].suffix.graph = move(h);
|
||||
g[v].suffix.graph = std::move(h);
|
||||
g[v].reports.clear();
|
||||
|
||||
// Swap v's literal for a shorter one.
|
||||
|
@ -464,7 +464,7 @@ void findFloodReach(const RoseBuildImpl &tbi, const RoseVertex v,
|
||||
namespace {
|
||||
struct LookProto {
|
||||
LookProto(s32 offset_in, CharReach reach_in)
|
||||
: offset(offset_in), reach(move(reach_in)) {}
|
||||
: offset(offset_in), reach(std::move(reach_in)) {}
|
||||
s32 offset;
|
||||
CharReach reach;
|
||||
};
|
||||
|
@ -738,7 +738,7 @@ void addFragmentLiteral(const RoseBuildImpl &build, MatcherProto &mp,
|
||||
|
||||
const auto &groups = f.groups;
|
||||
|
||||
mp.lits.emplace_back(move(s_final), nocase, noruns, f.fragment_id,
|
||||
mp.lits.emplace_back(std::move(s_final), nocase, noruns, f.fragment_id,
|
||||
groups, msk, cmp);
|
||||
}
|
||||
|
||||
@ -936,7 +936,7 @@ buildFloatingMatcherProto(const RoseBuildImpl &build,
|
||||
throw CompileError("Unable to generate literal matcher proto.");
|
||||
}
|
||||
|
||||
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
|
||||
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
|
||||
}
|
||||
|
||||
unique_ptr<LitProto>
|
||||
@ -964,7 +964,7 @@ buildDelayRebuildMatcherProto(const RoseBuildImpl &build,
|
||||
throw CompileError("Unable to generate literal matcher proto.");
|
||||
}
|
||||
|
||||
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
|
||||
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
|
||||
}
|
||||
|
||||
unique_ptr<LitProto>
|
||||
@ -1021,7 +1021,7 @@ buildSmallBlockMatcherProto(const RoseBuildImpl &build,
|
||||
throw CompileError("Unable to generate literal matcher proto.");
|
||||
}
|
||||
|
||||
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
|
||||
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
|
||||
}
|
||||
|
||||
unique_ptr<LitProto>
|
||||
@ -1046,7 +1046,7 @@ buildEodAnchoredMatcherProto(const RoseBuildImpl &build,
|
||||
throw CompileError("Unable to generate literal matcher proto.");
|
||||
}
|
||||
|
||||
return std::make_unique<LitProto>(move(proto), mp.accel_lits);
|
||||
return std::make_unique<LitProto>(std::move(proto), mp.accel_lits);
|
||||
}
|
||||
|
||||
} // namespace ue2
|
||||
|
@ -1442,7 +1442,7 @@ void mergeLeftfixesVariableLag(RoseBuildImpl &build) {
|
||||
|
||||
vector<vector<left_id>> chunks;
|
||||
for (auto &raw_group : engine_groups | map_values) {
|
||||
chunk(move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX);
|
||||
chunk(std::move(raw_group), &chunks, MERGE_GROUP_SIZE_MAX);
|
||||
}
|
||||
engine_groups.clear();
|
||||
|
||||
@ -1511,7 +1511,7 @@ namespace {
|
||||
struct DedupeLeftKey {
|
||||
DedupeLeftKey(const RoseBuildImpl &build,
|
||||
flat_set<pair<size_t, u32>> preds_in, const left_id &left)
|
||||
: left_hash(hashLeftfix(left)), preds(move(preds_in)),
|
||||
: left_hash(hashLeftfix(left)), preds(std::move(preds_in)),
|
||||
transient(contains(build.transient, left)) {
|
||||
}
|
||||
|
||||
@ -1599,7 +1599,7 @@ void dedupeLeftfixesVariableLag(RoseBuildImpl &build) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
engine_groups[DedupeLeftKey(build, move(preds), left)].emplace_back(left);
|
||||
engine_groups[DedupeLeftKey(build, std::move(preds), left)].emplace_back(left);
|
||||
}
|
||||
|
||||
/* We don't bother chunking as we expect deduping to be successful if the
|
||||
@ -2048,7 +2048,7 @@ void mergeCastleLeftfixes(RoseBuildImpl &build) {
|
||||
|
||||
vector<vector<left_id>> chunks;
|
||||
for (auto &raw_group : by_reach | map_values) {
|
||||
chunk(move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX);
|
||||
chunk(std::move(raw_group), &chunks, MERGE_CASTLE_GROUP_SIZE_MAX);
|
||||
}
|
||||
by_reach.clear();
|
||||
|
||||
@ -2429,7 +2429,7 @@ void pairwiseDfaMerge(vector<RawDfa *> &dfas,
|
||||
RawDfa *dfa_ptr = rdfa.get();
|
||||
dfa_mapping[dfa_ptr] = dfa_mapping[*it];
|
||||
dfa_mapping.erase(*it);
|
||||
winner.proto = move(rdfa);
|
||||
winner.proto = std::move(rdfa);
|
||||
|
||||
mergeOutfixInfo(winner, victim);
|
||||
|
||||
@ -2546,7 +2546,7 @@ void mergeOutfixCombo(RoseBuildImpl &tbi, const ReportManager &rm,
|
||||
// Transform this outfix into a DFA and add it to the merge set.
|
||||
dfa_mapping[rdfa.get()] = it - tbi.outfixes.begin();
|
||||
dfas.emplace_back(rdfa.get());
|
||||
outfix.proto = move(rdfa);
|
||||
outfix.proto = std::move(rdfa);
|
||||
new_dfas++;
|
||||
}
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
|
||||
assert(it != end());
|
||||
assert(prog.back()->code() == ROSE_INSTR_END);
|
||||
|
||||
return prog.insert(it, move(ri));
|
||||
return prog.insert(it, std::move(ri));
|
||||
}
|
||||
|
||||
RoseProgram::iterator RoseProgram::insert(RoseProgram::iterator it,
|
||||
@ -183,7 +183,7 @@ void RoseProgram::add_before_end(RoseProgram &&block) {
|
||||
return;
|
||||
}
|
||||
|
||||
insert(prev(prog.end()), move(block));
|
||||
insert(prev(prog.end()), std::move(block));
|
||||
}
|
||||
|
||||
void RoseProgram::add_block(RoseProgram &&block) {
|
||||
@ -209,7 +209,7 @@ void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
|
||||
assert(!prog.empty());
|
||||
|
||||
const RoseInstruction *old_ptr = it->get();
|
||||
*it = move(ri);
|
||||
*it = std::move(ri);
|
||||
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
|
||||
}
|
||||
|
||||
@ -307,19 +307,19 @@ void addEnginesEodProgram(u32 eodNfaIterOffset, RoseProgram &program) {
|
||||
|
||||
RoseProgram block;
|
||||
block.add_before_end(std::make_unique<RoseInstrEnginesEod>(eodNfaIterOffset));
|
||||
program.add_block(move(block));
|
||||
program.add_block(std::move(block));
|
||||
}
|
||||
|
||||
void addSuffixesEodProgram(RoseProgram &program) {
|
||||
RoseProgram block;
|
||||
block.add_before_end(std::make_unique<RoseInstrSuffixesEod>());
|
||||
program.add_block(move(block));
|
||||
program.add_block(std::move(block));
|
||||
}
|
||||
|
||||
void addMatcherEodProgram(RoseProgram &program) {
|
||||
RoseProgram block;
|
||||
block.add_before_end(std::make_unique<RoseInstrMatcherEod>());
|
||||
program.add_block(move(block));
|
||||
program.add_block(std::move(block));
|
||||
}
|
||||
|
||||
void addFlushCombinationProgram(RoseProgram &program) {
|
||||
@ -359,7 +359,7 @@ void makeRoleCheckLeftfix(const RoseBuildImpl &build,
|
||||
build.g[v].left.leftfix_report,
|
||||
end_inst);
|
||||
}
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -394,7 +394,7 @@ void makeAnchoredLiteralDelay(const RoseBuildImpl &build,
|
||||
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrAnchoredDelay>(groups, anch_id, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -404,7 +404,7 @@ void makeDedupe(const ReportManager &rm, const Report &report,
|
||||
auto ri =
|
||||
std::make_unique<RoseInstrDedupe>(report.quashSom, rm.getDkey(report),
|
||||
report.offsetAdjust, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -414,7 +414,7 @@ void makeDedupeSom(const ReportManager &rm, const Report &report,
|
||||
auto ri = std::make_unique<RoseInstrDedupeSom>(report.quashSom,
|
||||
rm.getDkey(report),
|
||||
report.offsetAdjust, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -522,11 +522,11 @@ void addLogicalSetRequired(const Report &report, ReportManager &rm,
|
||||
// set matching status of current lkey
|
||||
auto risl = std::make_unique<RoseInstrSetLogical>(report.lkey,
|
||||
report.offsetAdjust);
|
||||
program.add_before_end(move(risl));
|
||||
program.add_before_end(std::move(risl));
|
||||
// set current lkey's corresponding ckeys active, pending to check
|
||||
for (auto ckey : rm.getRelateCKeys(report.lkey)) {
|
||||
auto risc = std::make_unique<RoseInstrSetCombination>(ckey);
|
||||
program.add_before_end(move(risc));
|
||||
program.add_before_end(std::move(risc));
|
||||
}
|
||||
}
|
||||
|
||||
@ -543,14 +543,14 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
|
||||
if (report.minOffset > 0 || report.maxOffset < MAX_OFFSET) {
|
||||
auto ri = std::make_unique<RoseInstrCheckBounds>(report.minOffset,
|
||||
report.maxOffset, end_inst);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
// If this report has an exhaustion key, we can check it in the program
|
||||
// rather than waiting until we're in the callback adaptor.
|
||||
if (report.ekey != INVALID_EKEY) {
|
||||
auto ri = std::make_unique<RoseInstrCheckExhausted>(report.ekey, end_inst);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
// External SOM reports that aren't passthrough need their SOM value
|
||||
@ -559,7 +559,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
|
||||
report.type != EXTERNAL_CALLBACK_SOM_PASS) {
|
||||
auto ri = std::make_unique<RoseInstrSomFromReport>();
|
||||
writeSomOperation(report, &ri->som);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
// Min length constraint.
|
||||
@ -567,7 +567,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
|
||||
assert(build.hasSom);
|
||||
auto ri = std::make_unique<RoseInstrCheckMinLength>(
|
||||
report.offsetAdjust, report.minLength, end_inst);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
if (report.quashSom) {
|
||||
@ -650,11 +650,11 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
|
||||
if (has_som) {
|
||||
auto ri = std::make_unique<RoseInstrReportSomAware>();
|
||||
writeSomOperation(report, &ri->som);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
} else {
|
||||
auto ri = std::make_unique<RoseInstrReportSomInt>();
|
||||
writeSomOperation(report, &ri->som);
|
||||
report_block.add_before_end(move(ri));
|
||||
report_block.add_before_end(std::move(ri));
|
||||
}
|
||||
break;
|
||||
case INTERNAL_ROSE_CHAIN: {
|
||||
@ -715,7 +715,7 @@ void makeReport(const RoseBuildImpl &build, const ReportID id,
|
||||
throw CompileError("Unable to generate bytecode.");
|
||||
}
|
||||
|
||||
program.add_block(move(report_block));
|
||||
program.add_block(std::move(report_block));
|
||||
}
|
||||
|
||||
static
|
||||
@ -745,7 +745,7 @@ void makeRoleReports(const RoseBuildImpl &build,
|
||||
for (ReportID id : g[v].reports) {
|
||||
makeReport(build, id, report_som, report_block);
|
||||
}
|
||||
program.add_before_end(move(report_block));
|
||||
program.add_before_end(std::move(report_block));
|
||||
}
|
||||
|
||||
static
|
||||
@ -816,7 +816,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
|
||||
ri = std::make_unique<RoseInstrCheckMedLit>(lit.s.get_string(),
|
||||
end_inst);
|
||||
}
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ void makeCheckLiteralInstruction(const rose_literal_id &lit,
|
||||
} else {
|
||||
ri = std::make_unique<RoseInstrCheckLongLit>(lit.s.get_string(), end_inst);
|
||||
}
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -850,7 +850,7 @@ void makeRoleCheckNotHandled(ProgramBuild &prog_build, RoseVertex v,
|
||||
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrCheckNotHandled>(handled_key, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -979,7 +979,7 @@ bool makeRoleByte(const vector<LookEntry> &look, RoseProgram &program) {
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrCheckByte>(andmask_u8, cmpmask_u8, flip,
|
||||
checkbyte_offset, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -1011,7 +1011,7 @@ bool makeRoleMask(const vector<LookEntry> &look, RoseProgram &program) {
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrCheckMask>(and_mask, cmp_mask, neg_mask,
|
||||
base_offset, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -1066,7 +1066,7 @@ bool makeRoleMask32(const vector<LookEntry> &look,
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrCheckMask32>(and_mask, cmp_mask, neg_mask,
|
||||
base_offset, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1109,7 +1109,7 @@ bool makeRoleMask64(const vector<LookEntry> &look,
|
||||
const auto *end_inst = program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrCheckMask64>(and_mask, cmp_mask, neg_mask,
|
||||
base_offset, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1474,7 +1474,7 @@ bool makeRoleShufti(const vector<LookEntry> &look, RoseProgram &program,
|
||||
}
|
||||
}
|
||||
assert(ri);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1497,7 +1497,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
|
||||
const CharReach &reach = look.begin()->reach;
|
||||
auto ri = std::make_unique<RoseInstrCheckSingleLookaround>(offset, reach,
|
||||
program.end_instruction());
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1519,7 +1519,7 @@ void makeLookaroundInstruction(const vector<LookEntry> &look,
|
||||
|
||||
auto ri = std::make_unique<RoseInstrCheckLookaround>(look,
|
||||
program.end_instruction());
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -1774,7 +1774,7 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
|
||||
auto ri = std::make_unique<RoseInstrCheckMultipathShufti16x8>
|
||||
(nib_mask, bucket_select_lo, data_select_mask, hi_bits_mask,
|
||||
lo_bits_mask, neg_mask, base_offset, last_start, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
} else if (multi_len == 32) {
|
||||
neg_mask &= 0xffffffff;
|
||||
assert(!(hi_bits_mask & ~0xffffffffULL));
|
||||
@ -1784,20 +1784,20 @@ bool makeRoleMultipathShufti(const vector<vector<LookEntry>> &multi_look,
|
||||
(hi_mask, lo_mask, bucket_select_lo, data_select_mask,
|
||||
hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
|
||||
last_start, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
} else {
|
||||
auto ri = std::make_unique<RoseInstrCheckMultipathShufti32x16>
|
||||
(hi_mask, lo_mask, bucket_select_hi, bucket_select_lo,
|
||||
data_select_mask, hi_bits_mask, lo_bits_mask, neg_mask,
|
||||
base_offset, last_start, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
} else {
|
||||
auto ri = std::make_unique<RoseInstrCheckMultipathShufti64>
|
||||
(hi_mask, lo_mask, bucket_select_lo, data_select_mask,
|
||||
hi_bits_mask, lo_bits_mask, neg_mask, base_offset,
|
||||
last_start, end_inst);
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1865,10 +1865,10 @@ void makeRoleMultipathLookaround(const vector<vector<LookEntry>> &multi_look,
|
||||
ordered_look.emplace_back(multi_entry);
|
||||
}
|
||||
|
||||
auto ri = std::make_unique<RoseInstrMultipathLookaround>(move(ordered_look),
|
||||
auto ri = std::make_unique<RoseInstrMultipathLookaround>(std::move(ordered_look),
|
||||
last_start, start_mask,
|
||||
program.end_instruction());
|
||||
program.add_before_end(move(ri));
|
||||
program.add_before_end(std::move(ri));
|
||||
}
|
||||
|
||||
static
|
||||
@ -1893,7 +1893,7 @@ void makeRoleLookaround(const RoseBuildImpl &build,
|
||||
vector<LookEntry> look;
|
||||
vector<LookEntry> look_more;
|
||||
if (!looks.empty()) {
|
||||
look = move(looks.front());
|
||||
look = std::move(looks.front());
|
||||
}
|
||||
findLookaroundMasks(build, v, look_more);
|
||||
mergeLookaround(look, look_more);
|
||||
@ -2001,7 +2001,7 @@ void makeRoleInfixTriggers(const RoseBuildImpl &build,
|
||||
triggers.emplace_back(g[e].rose_cancel_prev_top, lbi.queue, top);
|
||||
}
|
||||
|
||||
addInfixTriggerInstructions(move(triggers), program);
|
||||
addInfixTriggerInstructions(std::move(triggers), program);
|
||||
}
|
||||
|
||||
|
||||
@ -2063,7 +2063,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
|
||||
RoseProgram block;
|
||||
makeRoleReports(build, leftfix_info, needs_catchup,
|
||||
target(e, build.g), block);
|
||||
eod_program.add_block(move(block));
|
||||
eod_program.add_block(std::move(block));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2077,7 +2077,7 @@ void makeRoleEagerEodReports(const RoseBuildImpl &build,
|
||||
addCheckOnlyEodInstruction(program);
|
||||
}
|
||||
|
||||
program.add_before_end(move(eod_program));
|
||||
program.add_before_end(std::move(eod_program));
|
||||
}
|
||||
|
||||
/** Makes a program for a role/vertex given a specific pred/in_edge. */
|
||||
@ -2124,33 +2124,33 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
|
||||
RoseProgram reports_block;
|
||||
makeRoleReports(build, leftfix_info, prog_build.needs_catchup, v,
|
||||
reports_block);
|
||||
effects_block.add_block(move(reports_block));
|
||||
effects_block.add_block(std::move(reports_block));
|
||||
|
||||
RoseProgram infix_block;
|
||||
makeRoleInfixTriggers(build, leftfix_info, engine_info_by_queue, v,
|
||||
infix_block);
|
||||
effects_block.add_block(move(infix_block));
|
||||
effects_block.add_block(std::move(infix_block));
|
||||
|
||||
// Note: SET_GROUPS instruction must be after infix triggers, as an infix
|
||||
// going dead may switch off groups.
|
||||
RoseProgram groups_block;
|
||||
makeRoleGroups(build.g, prog_build, v, groups_block);
|
||||
effects_block.add_block(move(groups_block));
|
||||
effects_block.add_block(std::move(groups_block));
|
||||
|
||||
RoseProgram suffix_block;
|
||||
makeRoleSuffix(build, suffixes, engine_info_by_queue, v, suffix_block);
|
||||
effects_block.add_block(move(suffix_block));
|
||||
effects_block.add_block(std::move(suffix_block));
|
||||
|
||||
RoseProgram state_block;
|
||||
makeRoleSetState(roleStateIndices, v, state_block);
|
||||
effects_block.add_block(move(state_block));
|
||||
effects_block.add_block(std::move(state_block));
|
||||
|
||||
// Note: EOD eager reports may generate a CHECK_ONLY_EOD instruction (if
|
||||
// the program doesn't have one already).
|
||||
RoseProgram eod_block;
|
||||
makeRoleEagerEodReports(build, leftfix_info, prog_build.needs_catchup, v,
|
||||
eod_block);
|
||||
effects_block.add_block(move(eod_block));
|
||||
effects_block.add_block(std::move(eod_block));
|
||||
|
||||
/* a 'ghost role' may do nothing if we know that its groups are already set
|
||||
* - in this case we can avoid producing a program at all. */
|
||||
@ -2158,7 +2158,7 @@ RoseProgram makeRoleProgram(const RoseBuildImpl &build,
|
||||
return {};
|
||||
}
|
||||
|
||||
program.add_before_end(move(effects_block));
|
||||
program.add_before_end(std::move(effects_block));
|
||||
return program;
|
||||
}
|
||||
|
||||
@ -2204,7 +2204,7 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
|
||||
continue;
|
||||
}
|
||||
|
||||
blocks.emplace_back(move(block));
|
||||
blocks.emplace_back(std::move(block));
|
||||
seen.emplace(blocks.back());
|
||||
}
|
||||
|
||||
@ -2219,10 +2219,10 @@ RoseProgram assembleProgramBlocks(vector<RoseProgram> &&blocks_in) {
|
||||
if (!prog.empty() && reads_work_done_flag(block)) {
|
||||
RoseProgram clear_block;
|
||||
clear_block.add_before_end(std::make_unique<RoseInstrClearWorkDone>());
|
||||
prog.add_block(move(clear_block));
|
||||
prog.add_block(std::move(clear_block));
|
||||
}
|
||||
|
||||
prog.add_block(move(block));
|
||||
prog.add_block(std::move(block));
|
||||
}
|
||||
|
||||
return prog;
|
||||
@ -2265,7 +2265,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
|
||||
engine_info_by_queue, roleStateIndices,
|
||||
prog_build, e);
|
||||
if (!role_prog.empty()) {
|
||||
pred_blocks[pred_state].add_block(move(role_prog));
|
||||
pred_blocks[pred_state].add_block(std::move(role_prog));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2284,7 +2284,7 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
|
||||
auto role_prog = makeRoleProgram(build, leftfix_info, suffixes,
|
||||
engine_info_by_queue, roleStateIndices,
|
||||
prog_build, e);
|
||||
role_programs.add_block(move(role_prog));
|
||||
role_programs.add_block(std::move(role_prog));
|
||||
}
|
||||
|
||||
if (lit_id == build.eod_event_literal_id) {
|
||||
@ -2299,8 +2299,8 @@ RoseProgram makeLiteralProgram(const RoseBuildImpl &build,
|
||||
// Literal may squash groups.
|
||||
makeGroupSquashInstruction(build, lit_id, unconditional_block);
|
||||
|
||||
role_programs.add_block(move(unconditional_block));
|
||||
lit_program.add_before_end(move(role_programs));
|
||||
role_programs.add_block(std::move(unconditional_block));
|
||||
lit_program.add_before_end(std::move(role_programs));
|
||||
|
||||
return lit_program;
|
||||
}
|
||||
@ -2331,10 +2331,10 @@ RoseProgram makeDelayRebuildProgram(const RoseBuildImpl &build,
|
||||
makePushDelayedInstructions(build.literals, prog_build,
|
||||
build.literal_info.at(lit_id).delayed_ids,
|
||||
prog);
|
||||
blocks.emplace_back(move(prog));
|
||||
blocks.emplace_back(std::move(prog));
|
||||
}
|
||||
|
||||
return assembleProgramBlocks(move(blocks));
|
||||
return assembleProgramBlocks(std::move(blocks));
|
||||
}
|
||||
|
||||
RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
|
||||
@ -2361,7 +2361,7 @@ RoseProgram makeEodAnchorProgram(const RoseBuildImpl &build,
|
||||
for (const auto &id : g[v].reports) {
|
||||
makeReport(build, id, has_som, report_block);
|
||||
}
|
||||
program.add_before_end(move(report_block));
|
||||
program.add_before_end(std::move(report_block));
|
||||
|
||||
return program;
|
||||
}
|
||||
@ -2413,7 +2413,7 @@ void addIncludedJumpProgram(RoseProgram &program, u32 child_offset,
|
||||
RoseProgram block;
|
||||
block.add_before_end(std::make_unique<RoseInstrIncludedJump>(child_offset,
|
||||
squash));
|
||||
program.add_block(move(block));
|
||||
program.add_block(std::move(block));
|
||||
}
|
||||
|
||||
static
|
||||
@ -2423,7 +2423,7 @@ void addPredBlockSingle(u32 pred_state, RoseProgram &pred_block,
|
||||
const auto *end_inst = pred_block.end_instruction();
|
||||
pred_block.insert(begin(pred_block),
|
||||
std::make_unique<RoseInstrCheckState>(pred_state, end_inst));
|
||||
program.add_block(move(pred_block));
|
||||
program.add_block(std::move(pred_block));
|
||||
}
|
||||
|
||||
static
|
||||
@ -2438,7 +2438,7 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
|
||||
|
||||
const RoseInstruction *end_inst = sparse_program.end_instruction();
|
||||
auto ri = std::make_unique<RoseInstrSparseIterAny>(num_states, keys, end_inst);
|
||||
sparse_program.add_before_end(move(ri));
|
||||
sparse_program.add_before_end(std::move(ri));
|
||||
|
||||
RoseProgram &block = pred_blocks.begin()->second;
|
||||
|
||||
@ -2446,8 +2446,8 @@ void addPredBlocksAny(map<u32, RoseProgram> &pred_blocks, u32 num_states,
|
||||
* blocks are being collapsed together */
|
||||
stripCheckHandledInstruction(block);
|
||||
|
||||
sparse_program.add_before_end(move(block));
|
||||
program.add_block(move(sparse_program));
|
||||
sparse_program.add_before_end(std::move(block));
|
||||
program.add_block(std::move(sparse_program));
|
||||
}
|
||||
|
||||
static
|
||||
@ -2462,14 +2462,14 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
|
||||
// BEGIN instruction.
|
||||
auto ri_begin = std::make_unique<RoseInstrSparseIterBegin>(num_states, end_inst);
|
||||
RoseInstrSparseIterBegin *begin_inst = ri_begin.get();
|
||||
sparse_program.add_before_end(move(ri_begin));
|
||||
sparse_program.add_before_end(std::move(ri_begin));
|
||||
|
||||
// NEXT instructions, one per pred program.
|
||||
u32 prev_key = pred_blocks.begin()->first;
|
||||
for (auto it = next(begin(pred_blocks)); it != end(pred_blocks); ++it) {
|
||||
auto ri = std::make_unique<RoseInstrSparseIterNext>(prev_key, begin_inst,
|
||||
end_inst);
|
||||
sparse_program.add_before_end(move(ri));
|
||||
sparse_program.add_before_end(std::move(ri));
|
||||
prev_key = it->first;
|
||||
}
|
||||
|
||||
@ -2483,7 +2483,7 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
|
||||
|
||||
assert(dynamic_cast<const RoseInstrSparseIterBegin *>(out_it->get()) ||
|
||||
dynamic_cast<const RoseInstrSparseIterNext *>(out_it->get()));
|
||||
out_it = sparse_program.insert(++out_it, move(flat_prog));
|
||||
out_it = sparse_program.insert(++out_it, std::move(flat_prog));
|
||||
|
||||
// Jump table target for this key is the beginning of the block we just
|
||||
// spliced in.
|
||||
@ -2495,9 +2495,9 @@ void addPredBlocksMulti(map<u32, RoseProgram> &pred_blocks,
|
||||
}
|
||||
|
||||
// Write the jump table back into the SPARSE_ITER_BEGIN instruction.
|
||||
begin_inst->jump_table = move(jump_table);
|
||||
begin_inst->jump_table = std::move(jump_table);
|
||||
|
||||
program.add_block(move(sparse_program));
|
||||
program.add_block(std::move(sparse_program));
|
||||
}
|
||||
|
||||
void addPredBlocks(map<u32, RoseProgram> &pred_blocks, u32 num_states,
|
||||
|
@ -242,7 +242,7 @@ u32 SomSlotManager::numSomSlots() const {
|
||||
|
||||
u32 SomSlotManager::addRevNfa(bytecode_ptr<NFA> nfa, u32 maxWidth) {
|
||||
u32 rv = verify_u32(rev_nfas.size());
|
||||
rev_nfas.emplace_back(move(nfa));
|
||||
rev_nfas.emplace_back(std::move(nfa));
|
||||
|
||||
// A rev nfa commits us to having enough history around to handle its
|
||||
// max width.
|
||||
|
@ -74,7 +74,7 @@ vector<u32> findCliqueGroup(CliqueGraph &cg) {
|
||||
// Get the vertex to start from
|
||||
vector<u32> clique;
|
||||
while (!gStack.empty()) {
|
||||
vector<u32> g = move(gStack.top());
|
||||
vector<u32> g = std::move(gStack.top());
|
||||
gStack.pop();
|
||||
|
||||
// Choose a vertex from the graph
|
||||
|
@ -174,7 +174,7 @@ unique_ptr<EngineStream> EngineHyperscan::streamOpen(EngineContext &ectx,
|
||||
return nullptr;
|
||||
}
|
||||
stream->sn = streamId;
|
||||
return move(stream);
|
||||
return std::move(stream);
|
||||
}
|
||||
|
||||
void EngineHyperscan::streamClose(unique_ptr<EngineStream> stream,
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
thread_barrier &tb_in, thread_func_t function_in,
|
||||
vector<DataBlock> corpus_data_in)
|
||||
: num(num_in), results(repeats), engine(db_in),
|
||||
enginectx(db_in.makeContext()), corpus_data(move(corpus_data_in)),
|
||||
enginectx(db_in.makeContext()), corpus_data(std::move(corpus_data_in)),
|
||||
tb(tb_in), function(function_in) {}
|
||||
|
||||
// Start the thread.
|
||||
@ -219,7 +219,7 @@ void usage(const char *error) {
|
||||
/** Wraps up a name and the set of signature IDs it refers to. */
|
||||
struct BenchmarkSigs {
|
||||
BenchmarkSigs(string name_in, SignatureSet sigs_in)
|
||||
: name(move(name_in)), sigs(move(sigs_in)) {}
|
||||
: name(std::move(name_in)), sigs(std::move(sigs_in)) {}
|
||||
string name;
|
||||
SignatureSet sigs;
|
||||
};
|
||||
@ -457,7 +457,7 @@ void processArgs(int argc, char *argv[], vector<BenchmarkSigs> &sigSets,
|
||||
for (const auto &file : sigFiles) {
|
||||
SignatureSet sigs;
|
||||
loadSignatureList(file, sigs);
|
||||
sigSets.emplace_back(file, move(sigs));
|
||||
sigSets.emplace_back(file, std::move(sigs));
|
||||
}
|
||||
|
||||
useLiteralApi = (bool)literalFlag;
|
||||
@ -590,7 +590,7 @@ void benchStreamingInternal(ThreadContext *ctx, vector<StreamInfo> &streams,
|
||||
|
||||
// if this was the last block in the stream, close the stream handle
|
||||
if (b.id == stream.last_block_id) {
|
||||
e.streamClose(move(stream.eng_handle), r);
|
||||
e.streamClose(std::move(stream.eng_handle), r);
|
||||
stream.eng_handle = nullptr;
|
||||
}
|
||||
}
|
||||
@ -963,7 +963,7 @@ void runBenchmark(const Engine &db,
|
||||
printf("Unable to start processing thread %u\n", i);
|
||||
exit(1);
|
||||
}
|
||||
threads.push_back(move(t));
|
||||
threads.push_back(std::move(t));
|
||||
}
|
||||
|
||||
// Reap threads.
|
||||
@ -1011,7 +1011,7 @@ int HS_CDECL main(int argc, char *argv[]) {
|
||||
for (auto i : exprMapTemplate | map_keys) {
|
||||
sigs.push_back(i);
|
||||
}
|
||||
sigSets.emplace_back(exprPath, move(sigs));
|
||||
sigSets.emplace_back(exprPath, std::move(sigs));
|
||||
}
|
||||
|
||||
// read in and process our corpus
|
||||
|
Loading…
x
Reference in New Issue
Block a user