From 4dee289550d11950d6d17482484061a4792b2eef Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 22 Oct 2010 15:51:52 +0000 Subject: * 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. --- src/libexpr/eval.hh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/libexpr/eval.hh') 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; -- cgit 1.4.1