* Don't create thunks for variable lookups (if possible). This
significantly reduces the number of values allocated (e.g. from 8.7m to 4.9m for the Bittorrent test).
This commit is contained in:
+2
-8
@@ -169,14 +169,6 @@ static inline void mkBool(Value & v, bool b)
|
||||
}
|
||||
|
||||
|
||||
static inline void mkThunk(Value & v, Env & env, Expr * expr)
|
||||
{
|
||||
v.type = tThunk;
|
||||
v.thunk.env = &env;
|
||||
v.thunk.expr = expr;
|
||||
}
|
||||
|
||||
|
||||
static inline void mkApp(Value & v, Value & left, Value & right)
|
||||
{
|
||||
v.type = tApp;
|
||||
@@ -325,6 +317,8 @@ public:
|
||||
void mkList(Value & v, unsigned int length);
|
||||
void mkAttrs(Value & v);
|
||||
void mkThunk_(Value & v, Expr * expr);
|
||||
|
||||
Value * maybeThunk(Env & env, Expr * expr);
|
||||
|
||||
void cloneAttrs(Value & src, Value & dst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user