diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-02T16·34+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-09-02T16·34+0200 |
commit | 57d18df7d0005cf822368d9f1d0c33396c6b9f9f (patch) | |
tree | 41ad0f3493b8c4baeb35f5b5028fb6cf9a17dc9f /src/libexpr/eval.cc | |
parent | 92077b4547b473bb4ea7b38077299e8fba75ca62 (diff) |
Add some support code for nix-repl
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index e5c7226c1b8c..6ac07eed6cb8 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -143,8 +143,8 @@ EvalState::EvalState() , sIgnoreNulls(symbols.create("__ignoreNulls")) , repair(false) , baseEnv(allocEnv(128)) - , baseEnvDispl(0) , staticBaseEnv(false, 0) + , baseEnvDispl(0) { nrEnvs = nrValuesInEnvs = nrValues = nrListElems = 0; nrAttrsets = nrOpUpdates = nrOpUpdateValuesCopied = 0; @@ -456,6 +456,13 @@ void EvalState::evalFile(const Path & path, Value & v) } +void EvalState::resetFileCache() +{ + fileEvalCache.clear(); + parseTrees.clear(); +} + + void EvalState::eval(Expr * e, Value & v) { e->eval(*this, baseEnv, v); |