refinements to LambdaExpr's to provide flexibility, support for ZVal captures

This commit is contained in:
Vern Paxson 2023-06-16 15:48:48 -07:00 committed by Arne Welzel
parent 06522c0264
commit 46983cfb2f
7 changed files with 194 additions and 58 deletions

View file

@ -23,8 +23,8 @@ void CPPCompile::CompileFunc(const FuncInfo& func)
void CPPCompile::CompileLambda(const LambdaExpr* l, const ProfileFunc* pf)
{
auto lname = Canonicalize(l->Name().c_str()) + "_lb";
auto body = l->Ingredients().Body();
auto l_id = l->Ingredients().GetID();
auto body = l->Ingredients()->Body();
auto l_id = l->Ingredients()->GetID();
auto& ids = l->OuterIDs();
DefineBody(l_id->GetType<FuncType>(), pf, lname, body, &ids, FUNC_FLAVOR_FUNCTION);