From 9985230c00226826949473c3862c0c3afea74aaf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 14 Apr 2010 14:42:32 +0000 Subject: * 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. --- src/libexpr/primops.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libexpr/primops.cc') diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 257dcd2e9..83af7ada9 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -999,9 +999,11 @@ void EvalState::createBaseEnv() { baseEnv.up = 0; +#if 0 Value & builtins = baseEnv.bindings[symbols.create("builtins")]; builtins.type = tAttrs; builtins.attrs = new Bindings; +#endif /* Add global constants such as `true' to the base environment. */ Value v; @@ -1023,9 +1025,11 @@ void EvalState::createBaseEnv() /* Add a wrapper around the derivation primop that computes the `drvPath' and `outPath' attributes lazily. */ +#if 0 string s = "attrs: let res = derivationStrict attrs; in attrs // { drvPath = res.drvPath; outPath = res.outPath; type = \"derivation\"; }"; mkThunk(v, baseEnv, parseExprFromString(*this, s, "/")); addConstant("derivation", v); +#endif // Miscellaneous addPrimOp("import", 1, prim_import); -- cgit v1.2.3