mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
reworked AST optimizers analysis of side effects during aggregate operations & calls
This commit is contained in:
parent
c028901146
commit
740a087765
13 changed files with 1119 additions and 223 deletions
|
@ -5,6 +5,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "zeek/Event.h"
|
||||
#include "zeek/script_opt/ProfileFunc.h"
|
||||
#include "zeek/script_opt/UseDefs.h"
|
||||
#include "zeek/script_opt/ZAM/ZBody.h"
|
||||
|
||||
|
@ -23,8 +24,6 @@ class Stmt;
|
|||
class SwitchStmt;
|
||||
class CatchReturnStmt;
|
||||
|
||||
class ProfileFunc;
|
||||
|
||||
using InstLabel = ZInstI*;
|
||||
|
||||
// Class representing a single compiled statement. (This is different from,
|
||||
|
@ -53,7 +52,7 @@ public:
|
|||
|
||||
class ZAMCompiler {
|
||||
public:
|
||||
ZAMCompiler(ScriptFunc* f, std::shared_ptr<ProfileFunc> pf, ScopePtr scope, StmtPtr body,
|
||||
ZAMCompiler(ScriptFunc* f, ProfileFuncs& pfs, std::shared_ptr<ProfileFunc> pf, ScopePtr scope, StmtPtr body,
|
||||
std::shared_ptr<UseDefs> ud, std::shared_ptr<Reducer> rd);
|
||||
~ZAMCompiler();
|
||||
|
||||
|
@ -503,6 +502,7 @@ private:
|
|||
std::vector<const NameExpr*> retvars;
|
||||
|
||||
ScriptFunc* func;
|
||||
ProfileFuncs& pfs;
|
||||
std::shared_ptr<ProfileFunc> pf;
|
||||
ScopePtr scope;
|
||||
StmtPtr body;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue