mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 03:58:20 +00:00
more extensive ZAM inlining & compilation of lambdas
This commit is contained in:
parent
b9949560c6
commit
1ff490b41c
10 changed files with 156 additions and 42 deletions
|
@ -4825,10 +4825,19 @@ ScopePtr LambdaExpr::GetScope() const
|
|||
return ingredients->Scope();
|
||||
}
|
||||
|
||||
void LambdaExpr::ReplaceBody(StmtPtr new_body)
|
||||
{
|
||||
ingredients->ReplaceBody(std::move(new_body));
|
||||
}
|
||||
|
||||
ValPtr LambdaExpr::Eval(Frame* f) const
|
||||
{
|
||||
auto lamb = make_intrusive<ScriptFunc>(ingredients->GetID());
|
||||
|
||||
// Use the primary function as the source of the frame size
|
||||
// and function body, rather than the ingredients, since script
|
||||
// optimization might have changed the former but not the latter.
|
||||
lamb->SetFrameSize(primary_func->FrameSize());
|
||||
StmtPtr body = primary_func->GetBodies()[0].stmts;
|
||||
|
||||
if ( run_state::is_parsing )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue