ZAM optimizer fix for += / -= set operations

This commit is contained in:
Vern Paxson 2025-07-08 18:18:27 -07:00 committed by Tim Wojtulewicz
parent 92868804b1
commit 1d43760862
3 changed files with 30 additions and 0 deletions

View file

@ -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;