mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11: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:
parent
816dd3f061
commit
9985230c00
7 changed files with 258 additions and 143 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue