mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
rose build: dedupe hasLastByteHistorySucc func
This commit is contained in:
parent
cf8e8c90ff
commit
d3c56b532b
@ -1776,22 +1776,12 @@ u32 addIteratorToTable(build_context &bc,
|
|||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
bool hasLastByteHistoryOutEdge(const RoseGraph &g, RoseVertex v) {
|
|
||||||
for (const auto &e : out_edges_range(v, g)) {
|
|
||||||
if (g[e].history == ROSE_ROLE_HISTORY_LAST_BYTE) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
static
|
||||||
u32 buildLastByteIter(const RoseGraph &g, build_context &bc) {
|
u32 buildLastByteIter(const RoseGraph &g, build_context &bc) {
|
||||||
vector<u32> lb_roles;
|
vector<u32> lb_roles;
|
||||||
|
|
||||||
for (auto v : vertices_range(g)) {
|
for (auto v : vertices_range(g)) {
|
||||||
if (!hasLastByteHistoryOutEdge(g, v)) {
|
if (!hasLastByteHistorySucc(g, v)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Eager EOD reporters won't have state indices.
|
// Eager EOD reporters won't have state indices.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user