mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 08:38:20 +00:00
Reformat the world
This commit is contained in:
parent
194cb24547
commit
b2f171ec69
714 changed files with 35149 additions and 35203 deletions
|
@ -4,32 +4,35 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "zeek/Func.h"
|
||||
#include "zeek/Expr.h"
|
||||
#include "zeek/Scope.h"
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "zeek/Expr.h"
|
||||
#include "zeek/Func.h"
|
||||
#include "zeek/Scope.h"
|
||||
|
||||
namespace zeek::detail {
|
||||
namespace zeek::detail
|
||||
{
|
||||
|
||||
class FuncInfo;
|
||||
|
||||
class Inliner {
|
||||
class Inliner
|
||||
{
|
||||
public:
|
||||
// First argument is a collection of information about *all* of
|
||||
// the script functions. Second argument states whether to report
|
||||
// recursive functions (of interest as they're not in-lineable).
|
||||
Inliner(std::vector<FuncInfo>& _funcs, bool _report_recursive)
|
||||
: funcs(_funcs), report_recursive(_report_recursive)
|
||||
{ Analyze(); }
|
||||
: funcs(_funcs), report_recursive(_report_recursive)
|
||||
{
|
||||
Analyze();
|
||||
}
|
||||
|
||||
// Either returns the original CallExpr if it's not inline-able,
|
||||
// or an InlineExpr if it is.
|
||||
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; }
|
||||
|
||||
protected:
|
||||
// Driver routine that analyzes all of the script functions and
|
||||
|
@ -57,7 +60,6 @@ protected:
|
|||
// Whether to generate a report about functions either directly and
|
||||
// indirectly recursive.
|
||||
bool report_recursive;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue