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:
parent
adaf64a99b
commit
35f2a6ba82
3 changed files with 23 additions and 24 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue