mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Merge remote-tracking branch 'origin/topic/vern/script-opt-Nov22-maint'
* origin/topic/vern/script-opt-Nov22-maint: Script optimization maintenance and updates: maintenance fixes for variadic run-time checks, '_' placeholder identifier "-O allow-cond" permits compiling scripts to C++ when influenced by @if conditionals more robust standalone compile-to-C++ properties fix for nested "when" statements test suite updates
This commit is contained in:
commit
951250b753
42 changed files with 271 additions and 159 deletions
|
@ -600,7 +600,7 @@ bool ForStmt::IsReduced(Reducer* c) const
|
|||
if ( ! c->IDsAreReduced(loop_vars) )
|
||||
return false;
|
||||
|
||||
if ( value_var && ! c->ID_IsReduced(value_var) )
|
||||
if ( value_var && (value_var->IsBlank() || ! c->ID_IsReduced(value_var)) )
|
||||
return false;
|
||||
|
||||
return body->IsReduced(c);
|
||||
|
@ -608,6 +608,13 @@ bool ForStmt::IsReduced(Reducer* c) const
|
|||
|
||||
StmtPtr ForStmt::DoReduce(Reducer* c)
|
||||
{
|
||||
if ( value_var && value_var->IsBlank() )
|
||||
{
|
||||
auto no_vv = make_intrusive<ForStmt>(loop_vars, e);
|
||||
no_vv->AddBody(body);
|
||||
return TransformMe(no_vv, c);
|
||||
}
|
||||
|
||||
StmtPtr red_e_stmt;
|
||||
|
||||
if ( c->Optimizing() )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue