mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
Get rid of the parse tree cache
Since we already cache files in normal form (fileEvalCache), caching parse trees is redundant. Note that getting rid of this cache doesn't actually save much memory at the moment, because parse trees are currently not freed / GC'ed.
This commit is contained in:
parent
57d18df7d0
commit
6f809194d7
6 changed files with 35 additions and 34 deletions
|
|
@ -82,8 +82,7 @@ static void prim_import(EvalState & state, Value * * args, Value & v)
|
|||
}
|
||||
w.attrs->sort();
|
||||
Value fun;
|
||||
state.mkThunk_(fun,
|
||||
state.parseExprFromFile(state.findFile("nix/imported-drv-to-derivation.nix")));
|
||||
state.evalFile(state.findFile("nix/imported-drv-to-derivation.nix"), fun);
|
||||
state.forceFunction(fun);
|
||||
mkApp(v, fun, w);
|
||||
state.forceAttrs(v);
|
||||
|
|
@ -1263,7 +1262,7 @@ void EvalState::createBaseEnv()
|
|||
|
||||
/* Add a wrapper around the derivation primop that computes the
|
||||
`drvPath' and `outPath' attributes lazily. */
|
||||
mkThunk_(v, parseExprFromFile(findFile("nix/derivation.nix")));
|
||||
evalFile(findFile("nix/derivation.nix"), v);
|
||||
addConstant("derivation", v);
|
||||
|
||||
/* Now that we've added all primops, sort the `builtins' attribute
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue