mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
parser.y: allocate Exprs in the allocator
This commit is contained in:
parent
948c89b367
commit
b2f0472fe2
1 changed files with 3 additions and 3 deletions
|
|
@ -813,7 +813,7 @@ public:
|
|||
[[gnu::always_inline]]
|
||||
C * add(auto &&... args)
|
||||
{
|
||||
return new C(std::forward<decltype(args)>(args)...);
|
||||
return alloc.new_object<C>(std::forward<decltype(args)>(args)...);
|
||||
}
|
||||
|
||||
// we define some calls to add explicitly so that the argument can be passed in as initializer lists
|
||||
|
|
@ -822,7 +822,7 @@ public:
|
|||
C * add(const PosIdx & pos, Expr * fun, std::vector<Expr *> && args)
|
||||
requires(std::same_as<C, ExprCall>)
|
||||
{
|
||||
return new C(pos, fun, std::move(args));
|
||||
return alloc.new_object<C>(pos, fun, std::move(args));
|
||||
}
|
||||
|
||||
template<class C>
|
||||
|
|
@ -830,7 +830,7 @@ public:
|
|||
C * add(const PosIdx & pos, Expr * fun, std::vector<Expr *> && args, PosIdx && cursedOrEndPos)
|
||||
requires(std::same_as<C, ExprCall>)
|
||||
{
|
||||
return new C(pos, fun, std::move(args), std::move(cursedOrEndPos));
|
||||
return alloc.new_object<C>(pos, fun, std::move(args), std::move(cursedOrEndPos));
|
||||
}
|
||||
|
||||
template<class C>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue