1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

* After parsing, compute level/displacement pairs for each variable

use site, allowing environments to be stores as vectors of values
  rather than maps.  This should speed up evaluation and reduce the
  number of allocations.
This commit is contained in:
Eelco Dolstra 2010-04-14 14:42:32 +00:00
parent 816dd3f061
commit 9985230c00
7 changed files with 258 additions and 143 deletions

View file

@ -51,11 +51,12 @@ void run(Strings args)
printMsg(lvlError, format("size of value: %1% bytes") % sizeof(Value));
printMsg(lvlError, format("size of int AST node: %1% bytes") % sizeof(ExprInt));
printMsg(lvlError, format("size of attrset AST node: %1% bytes") % sizeof(ExprAttrs));
doTest(state, "123");
doTest(state, "{ x = 1; y = 2; }");
doTest(state, "{ x = 1; y = 2; }.y");
doTest(state, "rec { x = 1; y = x; }.y");
doTest(state, "let x = 1; y = 2; z = 3; in let a = 4; in y");
doTest(state, "rec { x = 1; y = x; }.x");
doTest(state, "(x: x) 1");
doTest(state, "(x: y: y) 1 2");
doTest(state, "x: x");