mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
fix for ZAM optimization of '!' expressions
This commit is contained in:
parent
a72b1af2ea
commit
9c4da40e39
1 changed files with 2 additions and 2 deletions
|
@ -658,8 +658,8 @@ ExprPtr NotExpr::Duplicate() { return SetSucc(new NotExpr(op->Duplicate())); }
|
|||
bool NotExpr::WillTransform(Reducer* c) const { return op->Tag() == EXPR_NOT && Op()->GetType()->Tag() == TYPE_BOOL; }
|
||||
|
||||
ExprPtr NotExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
|
||||
if ( op->Tag() == EXPR_NOT && Op()->GetType()->Tag() == TYPE_BOOL )
|
||||
return Op()->Reduce(c, red_stmt);
|
||||
if ( op->Tag() == EXPR_NOT )
|
||||
return op->GetOp1()->Reduce(c, red_stmt);
|
||||
|
||||
return UnaryExpr::Reduce(c, red_stmt);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue