mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
put global statements into a quasi-function to support script optimization
This commit is contained in:
parent
8fb30f1d62
commit
95b89be571
4 changed files with 34 additions and 4 deletions
|
@ -96,6 +96,11 @@ extern std::unordered_set<const Func*> non_recursive_funcs;
|
|||
// Analyze a given function for optimization.
|
||||
extern void analyze_func(ScriptFuncPtr f);
|
||||
|
||||
// Analyze the given top-level statement(s) for optimization. Returns
|
||||
// a pointer to a FuncInfo for an argument-less quasi-function that can
|
||||
// be Invoked, or its body executed directly, to execute the statements.
|
||||
extern const FuncInfo* analyze_global_stmts(Stmt* stmts);
|
||||
|
||||
// Analyze all of the parsed scripts collectively for optimization.
|
||||
extern void analyze_scripts();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue