mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
refinements to LambdaExpr's to provide flexibility, support for ZVal captures
This commit is contained in:
parent
06522c0264
commit
46983cfb2f
7 changed files with 194 additions and 58 deletions
|
@ -150,7 +150,7 @@ void CPPCompile::Compile(bool report_uncompilable)
|
|||
for ( const auto& l : pfs.Lambdas() )
|
||||
{
|
||||
const auto& n = l->Name();
|
||||
const auto body = l->Ingredients().Body().get();
|
||||
const auto body = l->Ingredients()->Body().get();
|
||||
if ( lambda_ASTs.count(n) > 0 )
|
||||
// Reuse previous body.
|
||||
body_names[body] = body_names[lambda_ASTs[n]];
|
||||
|
@ -176,7 +176,7 @@ void CPPCompile::Compile(bool report_uncompilable)
|
|||
continue;
|
||||
|
||||
CompileLambda(l, pfs.ExprProf(l).get());
|
||||
lambda_ASTs[n] = l->Ingredients().Body().get();
|
||||
lambda_ASTs[n] = l->Ingredients()->Body().get();
|
||||
}
|
||||
|
||||
NL();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue