mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
consolidate information associated with function bodies
This commit is contained in:
parent
f92acb3a4c
commit
3b37eb4b3a
5 changed files with 19 additions and 20 deletions
|
@ -51,15 +51,14 @@ std::unordered_map<std::string, std::string> compiled_simple_funcs;
|
|||
// Maps function bodies to the names we use for them.
|
||||
std::unordered_map<const Stmt*, std::string> body_names;
|
||||
|
||||
// Maps function names to hashes of bodies.
|
||||
std::unordered_map<std::string, p_hash_type> body_hashes;
|
||||
struct BodyInfo {
|
||||
p_hash_type hash;
|
||||
int priority;
|
||||
const Location* loc; // for better-than-nothing error reporting
|
||||
};
|
||||
|
||||
// Maps function names to priorities, for hooks & event handlers.
|
||||
std::unordered_map<std::string, int> body_priorities;
|
||||
|
||||
// Maps function names to script locations, for better-than-nothing error
|
||||
// reporting.
|
||||
std::unordered_map<std::string, const Location*> body_locs;
|
||||
// Maps function names to their body info.
|
||||
std::unordered_map<std::string, BodyInfo> body_info;
|
||||
|
||||
// Maps function names to events relevant to them.
|
||||
std::unordered_map<std::string, std::vector<std::string>> body_events;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue