mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-19 10:34:25 +03:00
rose_build: reduce size/scope of context objects
This commit is contained in:
@@ -29,6 +29,9 @@
|
||||
#ifndef ROSE_BUILD_DUMP_H
|
||||
#define ROSE_BUILD_DUMP_H
|
||||
|
||||
#include "ue2common.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -39,30 +42,40 @@ namespace ue2 {
|
||||
class RoseBuildImpl;
|
||||
struct Grey;
|
||||
struct hwlmLiteral;
|
||||
struct LitFragment;
|
||||
struct left_id;
|
||||
struct suffix_id;
|
||||
|
||||
#ifdef DUMP_SUPPORT
|
||||
// Dump the Rose graph in graphviz representation.
|
||||
void dumpRoseGraph(const RoseBuildImpl &build, const RoseEngine *t,
|
||||
const char *filename);
|
||||
void dumpRoseGraph(const RoseBuildImpl &build, const char *filename);
|
||||
|
||||
void dumpRose(const RoseBuildImpl &build, const RoseEngine *t);
|
||||
void dumpRose(const RoseBuildImpl &build,
|
||||
const std::vector<LitFragment> &fragments,
|
||||
const std::map<left_id, u32> &leftfix_queue_map,
|
||||
const std::map<suffix_id, u32> &suffix_queue_map,
|
||||
const RoseEngine *t);
|
||||
|
||||
void dumpMatcherLiterals(const std::vector<hwlmLiteral> &lits,
|
||||
const std::string &name, const Grey &grey);
|
||||
|
||||
#else
|
||||
|
||||
static UNUSED
|
||||
void dumpRoseGraph(const RoseBuildImpl &, const RoseEngine *, const char *) {
|
||||
void dumpRoseGraph(const RoseBuildImpl &, const char *) {
|
||||
}
|
||||
|
||||
static UNUSED
|
||||
void dumpRose(const RoseBuildImpl &, const RoseEngine *) {
|
||||
void dumpRose(const RoseBuildImpl &, const std::vector<LitFragment> &,
|
||||
const std::map<left_id, u32> &, const std::map<suffix_id, u32> &,
|
||||
const RoseEngine *) {
|
||||
}
|
||||
|
||||
static UNUSED
|
||||
void dumpMatcherLiterals(const std::vector<hwlmLiteral> &, const std::string &,
|
||||
const Grey &) {
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace ue2
|
||||
|
||||
Reference in New Issue
Block a user