diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-14T14·42+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-04-14T14·42+0000 |
commit | 9985230c00226826949473c3862c0c3afea74aaf (patch) | |
tree | d221b96649f2a134cce366efdfc5685145567aa2 /src/libexpr/eval-test.cc | |
parent | 816dd3f0612111718c338842283c1ee6577b9f0a (diff) |
* 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.
Diffstat (limited to 'src/libexpr/eval-test.cc')
-rw-r--r-- | src/libexpr/eval-test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/eval-test.cc b/src/libexpr/eval-test.cc index d03d3bdeed1b..bcd3670dfedc 100644 --- a/src/libexpr/eval-test.cc +++ b/src/libexpr/eval-test.cc @@ -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"); |