diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T15·14+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-05-26T15·14+0200 |
commit | d8c061e044a07f7516d76df12bc6920f4f04e5ff (patch) | |
tree | 1be62260771b846d5ce94a9847a721ebac982499 /src/libexpr/eval.cc | |
parent | 62a6eeb1f3da0a5954ad2da54c454eb7fc1c6e5d (diff) |
Remove ExprBuiltin
It's slower than ExprVar since it doesn't compute a static displacement. Since we're not using the throw primop in the implementation of <...> anymore, it's also not really needed.
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index b6b69c2bdbf5..81ce7d9a3020 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1004,17 +1004,6 @@ void ExprOpNot::eval(EvalState & state, Env & env, Value & v) } -void ExprBuiltin::eval(EvalState & state, Env & env, Value & v) -{ - // Not a hot path at all, but would be nice to access state.baseEnv directly - Env *baseEnv = &env; - while (baseEnv->up) baseEnv = baseEnv->up; - Bindings::iterator binding = baseEnv->values[0]->attrs->find(name); - assert(binding != baseEnv->values[0]->attrs->end()); - v = *binding->value; -} - - void ExprOpEq::eval(EvalState & state, Env & env, Value & v) { Value v1; e1->eval(state, env, v1); |