mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
more extensive ZAM inlining & compilation of lambdas
This commit is contained in:
parent
b9949560c6
commit
1ff490b41c
10 changed files with 156 additions and 42 deletions
|
@ -32,7 +32,10 @@ public:
|
|||
ExprPtr CheckForInlining(CallExprPtr c);
|
||||
|
||||
// True if the given function has been inlined.
|
||||
bool WasInlined(const Func* f) { return inline_ables.count(f) > 0; }
|
||||
bool WasInlined(const Func* f)
|
||||
{
|
||||
return inline_ables.count(f) > 0 && skipped_inlining.count(f) == 0;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Driver routine that analyzes all of the script functions and
|
||||
|
@ -49,6 +52,10 @@ protected:
|
|||
// Functions that we've determined to be suitable for inlining.
|
||||
std::unordered_set<const Func*> inline_ables;
|
||||
|
||||
// Functions that we didn't fully inline, so require separate
|
||||
// compilation.
|
||||
std::unordered_set<const Func*> skipped_inlining;
|
||||
|
||||
// As we do inlining for a given function, this tracks the
|
||||
// largest frame size of any inlined function.
|
||||
int max_inlined_frame_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue