diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-31 12:44:21 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-07-31 12:44:21 +0200 |
commit | 0a470fc3453f56a0a242d8f467b8079fe0040ff7 (patch) | |
tree | feb889a3540586cb4247fcd8ca017bdd8d1b71dc /src/libexpr/eval.hh | |
parent | 8ae6d55db15bb0777e3d707afb994f6fcbcc6a65 (diff) |
Make Env smaller
Commit 20866a7031ca823055a221653b77986faa167329 added a ‘withAttrs’
field to Env, which is annoying because it makes every Env structure
bigger and we allocate millions of them. E.g. NixOS evaluation took
18 MiB more. So this commit squeezes ‘withAttrs’ into values[0].
Probably should use a union...
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index c820b28f4..6f6b2a900 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -52,8 +52,8 @@ struct PrimOp struct Env { Env * up; - unsigned int prevWith; // nr of levels up to next `with' environment - Expr * withAttrs; + unsigned short prevWith; // nr of levels up to next `with' environment + bool haveWithAttrs; Value * values[0]; }; |