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();
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;
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;
}
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));
}
}
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();
};
return nullptr;
}
- return std::make_unique<HWLMProto>(engType, move(des), lits,
+ return std::make_unique<HWLMProto>(engType, std::move(des), lits,
bucketToLits, make_small);
}
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() {}
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) {
} 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;
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));
}
}
extend(rdfa, rev_map, p, all, next_gen);
}
- paths = move(next_gen);
+ paths = std::move(next_gen);
}
dump_paths(paths);
*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 {
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;
}
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));
}
}
*streamState += streamStateLen;
*scratchStateSize += sizeof(RepeatControl);
- out.emplace_back(move(info));
+ out.emplace_back(std::move(info));
}
}
*isSingleReport = 0;
}
- return move(ri);
+ return std::move(ri);
}
u32 raw_report_info_impl::getReportListSize() const {
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
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();
}
*isSingleReport = 0;
}
- return move(ri);
+ return std::move(ri);
}
u32 sheng_build_strat::max_allowed_offset_accel() const {
throw CompileError("Pattern too large.");
}
- return { expr, move(graph) };
+ return { expr, std::move(graph) };
}
void NFABuilderImpl::setNodeReportID(Position pos, int offsetAdjust) {
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.
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;
}
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;
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);
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());
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());
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;
}
}
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
};
DEBUG_PRINTF("failed validation\n");
return false;
}
- masks.emplace_back(move(pm));
+ masks.emplace_back(std::move(pm));
}
for (const auto &pm : masks) {
if (!open.empty()) {
DEBUG_PRINTF("exit %zu\n", g[v].index);
- exits.emplace_back(move(v_exit));
+ exits.emplace_back(std::move(v_exit));
}
}
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 {
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;
return false;
}
- som_nfas.emplace_back(sink, report, move(nfa));
+ som_nfas.emplace_back(sink, report, std::move(nfa));
return true;
}
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.
max(cc.grey.maxHistoryAvailable, ng.maxSomRevHistoryAvailable));
}
- return ng.ssm.addRevNfa(move(nfa), maxWidth);
+ return ng.ssm.addRevNfa(std::move(nfa), maxWidth);
}
static
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());
}
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();
}
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;
}
}
}
void ComponentAlternation::append(unique_ptr<Component> component) {
- children.emplace_back(move(component));
+ children.emplace_back(std::move(component));
}
vector<PositionInfo> ComponentAlternation::first() const {
: 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() {}
* 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);
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
}
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,
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;
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;
}
}
assert(child);
ComponentSequence *seq = child.get();
- parent->addComponent(move(child));
+ parent->addComponent(std::move(child));
return seq;
}
assert(cc);
cc->add(c);
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
} else {
currentSeq->addComponent(getLiteralComponentClass(c, mode.caseless));
}
assert(cc);
cc->add(accum);
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
} else {
if (accum > 255) {
throw LocatedParseError(err_msg);
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) )
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
([^^] ${ fhold; fcall readUCP; })
'}' ${ if (!inCharClass) { // not inside [..]
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
})
currentCls->add(CLASS_UCP_C, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_L, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_M, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_N, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_P, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_S, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
currentCls->add(CLASS_UCP_Z, negated);
if (!inCharClass) {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
}
fret;
};
']' => {
currentCls->finalize();
- currentSeq->addComponent(move(currentCls));
+ currentSeq->addComponent(std::move(currentCls));
inCharClass = false;
fgoto main;
};
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint2c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
utf8_3c when is_utf8 => {
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint3c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
utf8_4c when is_utf8 => {
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint4c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
hi_byte when is_utf8 => {
# 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{' => {
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;
};
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;
};
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;
};
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;
};
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint2c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
utf8_3c when is_utf8 => {
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint3c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
utf8_4c when is_utf8 => {
auto cc = getComponentClass(mode);
cc->add(readUtf8CodePoint4c(ts));
cc->finalize();
- currentSeq->addComponent(move(cc));
+ currentSeq->addComponent(std::move(cc));
};
hi_byte when is_utf8 => {
// 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);
}
if (rdfa) {
- outfixes.emplace_back(OutfixInfo(move(rdfa)));
+ outfixes.emplace_back(OutfixInfo(std::move(rdfa)));
} else {
outfixes.emplace_back(OutfixInfo(cloneHolder(h)));
}
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();
// 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
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;
}
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");
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));
}
}
// 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();
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.
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;
}
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);
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);
}
}
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);
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);
}
}
}
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);
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;
}
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
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));
}
/**
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());
}
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) {
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));
}
}
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);
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;
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,
bc.roleStateIndices, prog_build,
build.eod_event_literal_id, edge_list,
false);
- program.add_block(move(block));
+ program.add_block(std::move(block));
}
static
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
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);
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());
/* 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;
}
// 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.
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;
};
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);
}
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>
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>
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>
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
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();
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)) {
}
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
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();
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);
// 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++;
}
}
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,
return;
}
- insert(prev(prog.end()), move(block));
+ insert(prev(prog.end()), std::move(block));
}
void RoseProgram::add_block(RoseProgram &&block) {
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());
}
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) {
build.g[v].left.leftfix_report,
end_inst);
}
- program.add_before_end(move(ri));
+ program.add_before_end(std::move(ri));
}
static
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
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
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
// 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));
}
}
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
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.
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) {
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: {
throw CompileError("Unable to generate bytecode.");
}
- program.add_block(move(report_block));
+ program.add_block(std::move(report_block));
}
static
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
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;
}
} 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
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
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;
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;
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;
}
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;
}
}
}
assert(ri);
- program.add_before_end(move(ri));
+ program.add_before_end(std::move(ri));
return true;
}
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;
}
auto ri = std::make_unique<RoseInstrCheckLookaround>(look,
program.end_instruction());
- program.add_before_end(move(ri));
+ program.add_before_end(std::move(ri));
}
static
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));
(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;
}
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
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);
triggers.emplace_back(g[e].rose_cancel_prev_top, lbi.queue, top);
}
- addInfixTriggerInstructions(move(triggers), program);
+ addInfixTriggerInstructions(std::move(triggers), program);
}
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));
}
}
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. */
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. */
return {};
}
- program.add_before_end(move(effects_block));
+ program.add_before_end(std::move(effects_block));
return program;
}
continue;
}
- blocks.emplace_back(move(block));
+ blocks.emplace_back(std::move(block));
seen.emplace(blocks.back());
}
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;
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));
}
}
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) {
// 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;
}
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,
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;
}
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
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
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;
* 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
// 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;
}
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.
}
// 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,
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.
// 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
return nullptr;
}
stream->sn = streamId;
- return move(stream);
+ return std::move(stream);
}
void EngineHyperscan::streamClose(unique_ptr<EngineStream> stream,
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.
/** 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;
};
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;
// 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;
}
}
printf("Unable to start processing thread %u\n", i);
exit(1);
}
- threads.push_back(move(t));
+ threads.push_back(std::move(t));
}
// Reap threads.
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