mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fixes for -O gen-standalone-C++ for tracking BiFs, lambdas, attribute types, and independent globals
This commit is contained in:
parent
69b7bcc323
commit
550c7eb0a7
3 changed files with 53 additions and 7 deletions
|
@ -366,6 +366,10 @@ public:
|
|||
ProfileFuncs(std::vector<FuncInfo>& funcs, is_compilable_pred pred, bool compute_func_hashes,
|
||||
bool full_record_hashes);
|
||||
|
||||
// Used to profile additional lambdas that (potentially) weren't part
|
||||
// of the overall function profiling.
|
||||
void ProfileLambda(const LambdaExpr* l);
|
||||
|
||||
// The following accessors provide a global profile across all of
|
||||
// the (non-skipped) functions in "funcs". See the comments for
|
||||
// the associated member variables for documentation.
|
||||
|
@ -449,6 +453,9 @@ protected:
|
|||
// Compute hashes to associate with each function
|
||||
void ComputeBodyHashes(std::vector<FuncInfo>& funcs);
|
||||
|
||||
// For a given lambda, completes analysis of its profile.
|
||||
void AnalyzeLambdaProfile(const LambdaExpr* l);
|
||||
|
||||
// Compute the hash associated with a single function profile.
|
||||
void ComputeProfileHash(std::shared_ptr<ProfileFunc> pf);
|
||||
|
||||
|
@ -540,6 +547,10 @@ protected:
|
|||
// And for lambda's.
|
||||
std::unordered_set<const LambdaExpr*> lambdas;
|
||||
|
||||
// Lambdas that we have already processed. An optimization to avoid
|
||||
// unnecessary work.
|
||||
std::unordered_set<const LambdaExpr*> processed_lambdas;
|
||||
|
||||
// Names of generated events.
|
||||
std::unordered_set<std::string> events;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue