diff options
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index eda081261..a24b7345e 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -18,13 +18,6 @@ struct Value; typedef std::map<Symbol, Value> Bindings; -struct Env -{ - Env * up; - Bindings bindings; -}; - - typedef enum { tInt = 1, tBool, @@ -109,6 +102,13 @@ struct Value }; +struct Env +{ + Env * up; + Value values[0]; +}; + + static inline void mkInt(Value & v, int n) { v.type = tInt; @@ -258,7 +258,7 @@ public: /* Allocation primitives. */ Value * allocValues(unsigned int count); - Env & allocEnv(); + Env & allocEnv(unsigned int size); void mkList(Value & v, unsigned int length); void mkAttrs(Value & v); |