mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
Inline allocValue()
This commit is contained in:
parent
14f7a60755
commit
9b822de4ef
2 changed files with 6 additions and 8 deletions
|
|
@ -539,13 +539,6 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ptr<Value> EvalState::allocValue()
|
|
||||||
{
|
|
||||||
nrValues++;
|
|
||||||
return gc.alloc<Value>(Value::words());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Ptr<Env> EvalState::allocEnv(size_t size, size_t prevWith, Tag type)
|
Ptr<Env> EvalState::allocEnv(size_t size, size_t prevWith, Tag type)
|
||||||
{
|
{
|
||||||
nrEnvs++;
|
nrEnvs++;
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,12 @@ public:
|
||||||
void autoCallFunction(Bindings & args, Value & fun, Value & res);
|
void autoCallFunction(Bindings & args, Value & fun, Value & res);
|
||||||
|
|
||||||
/* Allocation primitives. */
|
/* Allocation primitives. */
|
||||||
Ptr<Value> allocValue();
|
Ptr<Value> allocValue()
|
||||||
|
{
|
||||||
|
nrValues++;
|
||||||
|
return gc.alloc<Value>(Value::words());
|
||||||
|
}
|
||||||
|
|
||||||
Ptr<Env> allocEnv(size_t size, size_t prevWith = 0, Tag type = tEnv);
|
Ptr<Env> allocEnv(size_t size, size_t prevWith = 0, Tag type = tEnv);
|
||||||
|
|
||||||
// Note: the resulting Value is only reachable as long as vAttrs
|
// Note: the resulting Value is only reachable as long as vAttrs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue