mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
AST profiling enhnacements in support of script optimization for lambdas/whens
This commit is contained in:
parent
46983cfb2f
commit
110ba7a0a1
3 changed files with 63 additions and 32 deletions
|
@ -420,9 +420,9 @@ void CPPCompile::GenWhenStmt(const WhenStmt* w)
|
|||
NL();
|
||||
|
||||
Emit("std::vector<ValPtr> CPP__local_aggrs;");
|
||||
for ( auto l : wi->WhenExprLocals() )
|
||||
for ( auto& l : wi->WhenExprLocals() )
|
||||
if ( IsAggr(l->GetType()) )
|
||||
Emit("CPP__local_aggrs.emplace_back(%s);", IDNameStr(l));
|
||||
Emit("CPP__local_aggrs.emplace_back(%s);", IDNameStr(l.get()));
|
||||
|
||||
Emit("CPP__wi->Instantiate(%s);", GenExpr(wi->Lambda(), GEN_NATIVE));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue