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

Make ifs and asserts tail-recursive

The local Value object prevented g++ from making a tail call.  Not
clear why.  In any case, not using a temporary makes g++ do the tail
call.
This commit is contained in:
Eelco Dolstra 2013-11-07 14:33:35 +01:00
parent 4badd7ed17
commit 273322c773
2 changed files with 11 additions and 4 deletions

View file

@ -145,6 +145,7 @@ public:
/* Evaluation the expression, then verify that it has the expected
type. */
inline bool evalBool(Env & env, Expr * e, Value & v);
inline bool evalBool(Env & env, Expr * e);
inline void evalAttrs(Env & env, Expr * e, Value & v);