about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26T15·14+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-05-26T15·14+0200
commitd8c061e044a07f7516d76df12bc6920f4f04e5ff (patch)
tree1be62260771b846d5ce94a9847a721ebac982499 /src/libexpr/eval.cc
parent62a6eeb1f3da0a5954ad2da54c454eb7fc1c6e5d (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.cc11
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);