diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-10-22T15·51+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-10-22T15·51+0000 |
commit | 4dee289550d11950d6d17482484061a4792b2eef (patch) | |
tree | 6a74fdca1b9c4737ae9267007f2be7aabcdfa636 /src/libexpr/eval.hh | |
parent | cf7e645a48a31e04428778a8d39924a3da8a30f8 (diff) |
* In environments, store pointers to values rather than values. This
improves GC effectiveness a bit more (because a live value doesn't keep other values in the environment plus the parent environments alive), and removes the need for copy nodes.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index ee7db91a08b2..b6ec927f01fa 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -38,7 +38,6 @@ typedef enum { tThunk, tApp, tLambda, - tCopy, tBlackhole, tPrimOp, tPrimOpApp, @@ -116,7 +115,7 @@ struct Env { Env * up; unsigned int prevWith; // nr of levels up to next `with' environment - Value values[0]; + Value * values[0]; }; @@ -150,13 +149,6 @@ static inline void mkThunk(Value & v, Env & env, Expr * expr) } -static inline void mkCopy(Value & v, Value & src) -{ - v.type = tCopy; - v.val = &src; -} - - static inline void mkApp(Value & v, Value & left, Value & right) { v.type = tApp; |