From 9b822de4ef09cb668abae8189ad9b2555144d5a0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 29 Apr 2019 09:08:50 +0200 Subject: [PATCH] Inline allocValue() --- src/libexpr/eval.cc | 7 ------- src/libexpr/eval.hh | 7 ++++++- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 72fc2a349..b7ca95fa1 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -539,13 +539,6 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval) } -Ptr EvalState::allocValue() -{ - nrValues++; - return gc.alloc(Value::words()); -} - - Ptr EvalState::allocEnv(size_t size, size_t prevWith, Tag type) { nrEnvs++; diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 0ad6d6f24..c537dad53 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -286,7 +286,12 @@ public: void autoCallFunction(Bindings & args, Value & fun, Value & res); /* Allocation primitives. */ - Ptr allocValue(); + Ptr allocValue() + { + nrValues++; + return gc.alloc(Value::words()); + } + Ptr allocEnv(size_t size, size_t prevWith = 0, Tag type = tEnv); // Note: the resulting Value is only reachable as long as vAttrs