mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
BIT-1384: Remove -O (optimize scripts) command-line option.
This commit is contained in:
parent
da24fa40a5
commit
b42706f0b5
8 changed files with 47 additions and 1003 deletions
21
src/Stmt.h
21
src/Stmt.h
|
@ -33,10 +33,6 @@ public:
|
|||
{ return Stmt::SetLocationInfo(loc, loc); }
|
||||
bool SetLocationInfo(const Location* start, const Location* end);
|
||||
|
||||
// Returns a fully simplified version of the statement (this
|
||||
// may be the same statement, or a newly created one).
|
||||
virtual Stmt* Simplify();
|
||||
|
||||
// True if the statement has no side effects, false otherwise.
|
||||
virtual int IsPure() const;
|
||||
|
||||
|
@ -112,9 +108,6 @@ protected:
|
|||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
virtual Val* DoExec(val_list* vals, stmt_flow_type& flow) const = 0;
|
||||
|
||||
Stmt* Simplify();
|
||||
virtual Stmt* DoSimplify();
|
||||
|
||||
void Describe(ODesc* d) const;
|
||||
void PrintVals(ODesc* d, val_list* vals, int offset) const;
|
||||
|
||||
|
@ -156,12 +149,8 @@ protected:
|
|||
|
||||
virtual Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
|
||||
Stmt* Simplify();
|
||||
int IsPure() const;
|
||||
|
||||
// Called by Simplify(), after the expression's been simplified.
|
||||
virtual Stmt* DoSimplify();
|
||||
|
||||
DECLARE_SERIAL(ExprStmt);
|
||||
|
||||
Expr* e;
|
||||
|
@ -184,7 +173,6 @@ protected:
|
|||
IfStmt() { s1 = s2 = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
Stmt* DoSimplify();
|
||||
int IsPure() const;
|
||||
|
||||
DECLARE_SERIAL(IfStmt);
|
||||
|
@ -237,7 +225,6 @@ protected:
|
|||
SwitchStmt() { cases = 0; default_case_idx = -1; comp_hash = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
Stmt* DoSimplify();
|
||||
int IsPure() const;
|
||||
|
||||
DECLARE_SERIAL(SwitchStmt);
|
||||
|
@ -329,7 +316,6 @@ protected:
|
|||
{ loop_condition = 0; body = 0; }
|
||||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
Stmt* Simplify();
|
||||
|
||||
DECLARE_SERIAL(WhileStmt);
|
||||
|
||||
|
@ -359,7 +345,6 @@ protected:
|
|||
ForStmt() { loop_vars = 0; body = 0; }
|
||||
|
||||
Val* DoExec(Frame* f, Val* v, stmt_flow_type& flow) const;
|
||||
Stmt* DoSimplify();
|
||||
|
||||
DECLARE_SERIAL(ForStmt);
|
||||
|
||||
|
@ -442,7 +427,6 @@ public:
|
|||
TraversalCode Traverse(TraversalCallback* cb) const;
|
||||
|
||||
protected:
|
||||
Stmt* Simplify();
|
||||
int IsPure() const;
|
||||
|
||||
DECLARE_SERIAL(StmtList);
|
||||
|
@ -464,7 +448,6 @@ public:
|
|||
// bool IsTopmost() { return topmost; }
|
||||
|
||||
protected:
|
||||
Stmt* Simplify();
|
||||
|
||||
DECLARE_SERIAL(EventBodyList);
|
||||
|
||||
|
@ -522,7 +505,6 @@ public:
|
|||
|
||||
Val* Exec(Frame* f, stmt_flow_type& flow) const;
|
||||
int IsPure() const;
|
||||
Stmt* Simplify();
|
||||
|
||||
const Expr* Cond() const { return cond; }
|
||||
const Stmt* Body() const { return s1; }
|
||||
|
@ -545,7 +527,4 @@ protected:
|
|||
bool is_return;
|
||||
};
|
||||
|
||||
extern Stmt* simplify_stmt(Stmt* s);
|
||||
extern int same_stmt(const Stmt* s1, const Stmt* s2);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue