about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 413234f2bf19..694d4407b847 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -211,8 +211,17 @@ private:
 
     bool allowUnsafeEquality;
 
+    /* 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;
+#else
+    typedef std::map<Path, Value> FileEvalCache;
+#endif
+    FileEvalCache fileEvalCache;
+
     typedef list<std::pair<string, Path> > SearchPath;
     SearchPath searchPath;
     SearchPath::iterator searchPathInsertionPoint;