1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 00:11:17 +02:00

* Don't use dynamic_cast, it's very slow. "nix-instantiate

/etc/nixos/nixos -A system" spent about 10% of its time in
  dynamic_cast.
This commit is contained in:
Eelco Dolstra 2012-01-04 21:24:11 +00:00
parent adaf64a99b
commit 35f2a6ba82
3 changed files with 23 additions and 24 deletions

View file

@ -53,6 +53,7 @@ struct Expr
virtual void show(std::ostream & str);
virtual void bindVars(const StaticEnv & env);
virtual void eval(EvalState & state, Env & env, Value & v);
virtual Value * maybeThunk(EvalState & state, Env & env);
};
std::ostream & operator << (std::ostream & str, Expr & e);
@ -117,6 +118,7 @@ struct ExprVar : Expr
VarRef info;
ExprVar(const Symbol & name) : info(name) { };
COMMON_METHODS
Value * maybeThunk(EvalState & state, Env & env);
};
struct ExprSelect : Expr