convert scopes to be managed using IntrusivePtr's

This commit is contained in:
Vern Paxson 2021-05-30 17:20:29 -07:00
parent f2f041b63b
commit efd03d41f8
16 changed files with 41 additions and 48 deletions

View file

@ -1327,9 +1327,8 @@ lambda_body:
// Gather the ingredients for a Func from the
// current scope.
auto ingredients = std::make_unique<function_ingredients>(
IntrusivePtr{NewRef{}, current_scope()},
IntrusivePtr{AdoptRef{}, $3});
IDPList outer_ids = gather_outer_ids(pop_scope().get(), ingredients->body.get());
current_scope(), IntrusivePtr{AdoptRef{}, $3});
auto outer_ids = gather_outer_ids(pop_scope(), ingredients->body);
$$ = new LambdaExpr(std::move(ingredients), std::move(outer_ids));
}