mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 11:38:20 +00:00
fixes for missed optimization opportunities
This commit is contained in:
parent
1a97b0572a
commit
f0eccda180
2 changed files with 11 additions and 5 deletions
|
@ -1007,10 +1007,13 @@ bool CSE_ValidityChecker::CheckID(const ID* id, bool ignore_orig) const {
|
||||||
if ( id == i )
|
if ( id == i )
|
||||||
return true; // reassignment
|
return true; // reassignment
|
||||||
|
|
||||||
if ( id_t && same_type(id_t, i->GetType()) )
|
if ( id_t && same_type(id_t, i->GetType()) ) {
|
||||||
// Same-type aggregate.
|
// printf("identifier %s (%d), start %s, end %s\n", id->Name(), ignore_orig, obj_desc(start_e).c_str(),
|
||||||
|
// obj_desc(end_e).c_str()); Same-type aggregate.
|
||||||
|
// if ( ignore_orig )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -951,10 +951,13 @@ TraversalCode CatchReturnStmt::Traverse(TraversalCallback* cb) const {
|
||||||
TraversalCode tc = cb->PreStmt(this);
|
TraversalCode tc = cb->PreStmt(this);
|
||||||
HANDLE_TC_STMT_PRE(tc);
|
HANDLE_TC_STMT_PRE(tc);
|
||||||
|
|
||||||
block->Traverse(cb);
|
tc = block->Traverse(cb);
|
||||||
|
HANDLE_TC_STMT_PRE(tc);
|
||||||
|
|
||||||
if ( ret_var )
|
if ( ret_var ) {
|
||||||
ret_var->Traverse(cb);
|
tc = ret_var->Traverse(cb);
|
||||||
|
HANDLE_TC_STMT_PRE(tc);
|
||||||
|
}
|
||||||
|
|
||||||
tc = cb->PostStmt(this);
|
tc = cb->PostStmt(this);
|
||||||
HANDLE_TC_STMT_POST(tc);
|
HANDLE_TC_STMT_POST(tc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue