about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-03T10·56+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-09-03T11·01+0200
commit6f809194d7448c4ad50174bed9ba2419e2114352 (patch)
tree03e493977baf95671cb652b197772376c68fe130 /src/libexpr/eval.hh
parent57d18df7d0005cf822368d9f1d0c33396c6b9f9f (diff)
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.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 98ac0bdb45a4..29c8341dfb9a 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -103,9 +103,6 @@ public:
 private:
     SrcToStore srcToStore;
 
-    /* A cache from path names to parse trees. */
-    std::map<Path, Expr *> parseTrees;
-
     /* A cache from path names to values. */
 #if HAVE_BOEHMGC
     typedef std::map<Path, Value, std::less<Path>, gc_allocator<std::pair<const Path, Value> > > FileEvalCache;
@@ -125,9 +122,8 @@ public:
 
     void addToSearchPath(const string & s);
 
-    /* Parse a Nix expression from the specified file.  If `path'
-       refers to a directory, then "/default.nix" is appended. */
-    Expr * parseExprFromFile(Path path);
+    /* Parse a Nix expression from the specified file. */
+    Expr * parseExprFromFile(const Path & path);
 
     /* Parse a Nix expression from the specified string. */
     Expr * parseExprFromString(const string & s, const Path & basePath, StaticEnv & staticEnv);
@@ -278,4 +274,8 @@ private:
 string showType(const Value & v);
 
 
+/* If `path' refers to a directory, then append "/default.nix". */
+Path resolveExprPath(Path path);
+
+
 }