1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

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.
This commit is contained in:
Eelco Dolstra 2014-05-26 17:14:28 +02:00
parent 62a6eeb1f3
commit d8c061e044
4 changed files with 8 additions and 35 deletions

View file

@ -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);