about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2004-02-04T16·03+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2004-02-04T16·03+0000
commit9b44480612dd30a7292ec94a88e4018b8f18e3f0 (patch)
tree0c83114806a4f7724a5dd8dcb0694103e70acb71 /src/libexpr/nixexpr.hh
parentc4f7ae4aa5fc7071cfa853ec5d75aaf00e7a97fc (diff)
* Use a map to lookup primops.
* Various performance improvements in the evaluator.
* Do not link against unused (and missing!) libraries (-lsglr, etc.).

Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh
index 26c29a2f38b1..924f8b912f77 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -23,7 +23,7 @@ private:
     ATermTable table;
     
 public:
-    ATermMap(unsigned int initialSize = 16, unsigned int maxLoadPct = 75);
+    ATermMap(unsigned int initialSize = 64, unsigned int maxLoadPct = 75);
     ATermMap(const ATermMap & map);
     ~ATermMap();
 
@@ -37,6 +37,13 @@ public:
     void remove(const string & key);
 
     ATermList keys() const;
+
+    void add(const ATermMap & map);
+    
+    void reset();
+
+private:
+    void add(const ATermMap & map, ATermList & keys);
 };