mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02: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
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue