mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 19:48:20 +00:00
ZAM optimizer fix for += / -= set operations
This commit is contained in:
parent
92868804b1
commit
1d43760862
3 changed files with 30 additions and 0 deletions
|
@ -767,6 +767,9 @@ bool AddToExpr::IsReduced(Reducer* c) const {
|
|||
}
|
||||
|
||||
ExprPtr AddToExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
|
||||
if ( c->Optimizing() )
|
||||
op2 = c->UpdateExpr(op2);
|
||||
|
||||
auto tag = op1->GetType()->Tag();
|
||||
|
||||
switch ( tag ) {
|
||||
|
@ -869,6 +872,9 @@ bool RemoveFromExpr::IsReduced(Reducer* c) const {
|
|||
}
|
||||
|
||||
ExprPtr RemoveFromExpr::Reduce(Reducer* c, StmtPtr& red_stmt) {
|
||||
if ( c->Optimizing() )
|
||||
op2 = c->UpdateExpr(op2);
|
||||
|
||||
if ( op1->GetType()->Tag() == TYPE_TABLE ) {
|
||||
StmtPtr red_stmt1;
|
||||
StmtPtr red_stmt2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue