mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 16:22:22 +03:00
rose: Extend the interpreter to handle more work
- Use program for EOD sparse iterator - Use program for literal sparse iterator - Eliminate RoseRole, RosePred, RoseVertexProps::role - Small performance optimizations
This commit is contained in:
committed by
Matthew Barr
parent
9cb2233589
commit
d67c7583ea
@@ -39,7 +39,7 @@
|
||||
|
||||
#include "ue2common.h"
|
||||
#include "rose_build.h"
|
||||
#include "rose_internal.h" /* role history, etc */
|
||||
#include "rose_internal.h"
|
||||
#include "nfa/nfa_internal.h" // for MO_INVALID_IDX
|
||||
#include "util/charreach.h"
|
||||
#include "util/depth.h"
|
||||
@@ -65,6 +65,14 @@ enum rose_literal_table {
|
||||
ROSE_EVENT //!< "literal-like" events, such as EOD
|
||||
};
|
||||
|
||||
/** \brief Edge history types. */
|
||||
enum RoseRoleHistory {
|
||||
ROSE_ROLE_HISTORY_NONE, //!< no special history
|
||||
ROSE_ROLE_HISTORY_ANCH, //!< previous role is at a fixed offset
|
||||
ROSE_ROLE_HISTORY_LAST_BYTE, //!< previous role can only match at EOD
|
||||
ROSE_ROLE_HISTORY_INVALID //!< history not yet assigned
|
||||
};
|
||||
|
||||
#include "util/order_check.h"
|
||||
|
||||
/** \brief Provides information about the (pre|in)fix engine to the left of a
|
||||
@@ -140,9 +148,6 @@ struct RoseVertexProps {
|
||||
/** \brief Report IDs to fire. */
|
||||
flat_set<ReportID> reports;
|
||||
|
||||
/** \brief Role ID for this vertex. These are what end up in the bytecode. */
|
||||
u32 role = ~u32{0};
|
||||
|
||||
/** \brief Bitmask of groups that this role sets. */
|
||||
rose_group groups = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user