about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-07T13·33+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12T11·32+0000
commit273322c7732093a354e86df82cf75d6604b8bce8 (patch)
tree15a9aa8822b969d677c2c790f4ae9c272552f275 /src/libexpr/eval.hh
parent4badd7ed17b4628d3a8d96e21c900aa91004daaf (diff)
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.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index cac8af877071..4e8e7e5f9ca0 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -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);