mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 09:21:52 +03:00
rose: replace RoseLiteralMap use of bimap
This apoproach is simpler and more efficient for cases with large numbers of literals.
This commit is contained in:
committed by
Matthew Barr
parent
a75b2ba2e5
commit
8b9328fe9e
@@ -235,7 +235,7 @@ void convertFloodProneSuffix(RoseBuildImpl &tbi, RoseVertex v, u32 lit_id,
|
||||
static
|
||||
size_t findFloodProneSuffixLen(const RoseBuildImpl &tbi) {
|
||||
size_t numLiterals = 0;
|
||||
for (const rose_literal_id &lit : tbi.literals.right | map_values) {
|
||||
for (const rose_literal_id &lit : tbi.literals) {
|
||||
if (lit.delay) {
|
||||
continue; // delay ids are virtual-ish
|
||||
}
|
||||
@@ -293,7 +293,7 @@ void convertFloodProneSuffixes(RoseBuildImpl &tbi) {
|
||||
}
|
||||
|
||||
u32 lit_id = *g[v].literals.begin();
|
||||
const rose_literal_id &lit = tbi.literals.right.at(lit_id);
|
||||
const rose_literal_id &lit = tbi.literals.at(lit_id);
|
||||
|
||||
// anchored or delayed literals need thought.
|
||||
if (lit.table != ROSE_FLOATING || lit.delay) {
|
||||
|
||||
Reference in New Issue
Block a user