chore(3p/nix/libexpr): Minor readability improvements in eval/value

This commit is contained in:
Vincent Ambo 2020-05-23 04:43:16 +01:00
parent 92792264f7
commit da4ca4e02f
4 changed files with 7 additions and 19 deletions

View file

@ -53,6 +53,10 @@ typedef std::list<SearchPathElem> SearchPath;
/* Initialise the Boehm GC, if applicable. */
void initGC();
typedef std::map<Path, Expr*, std::less<Path>,
traceable_allocator<std::pair<const Path, Expr*>>>
FileParseCache;
class EvalState {
public:
SymbolTable symbols;
@ -79,23 +83,12 @@ class EvalState {
SrcToStore srcToStore;
/* A cache from path names to parse trees. */
#if HAVE_BOEHMGC
typedef std::map<Path, Expr*, std::less<Path>,
traceable_allocator<std::pair<const Path, Expr*>>>
FileParseCache;
#else
typedef std::map<Path, Expr*> FileParseCache;
#endif
FileParseCache fileParseCache;
/* A cache from path names to values. */
#if HAVE_BOEHMGC
typedef std::map<Path, Value, std::less<Path>,
traceable_allocator<std::pair<const Path, Value>>>
FileEvalCache;
#else
typedef std::map<Path, Value> FileEvalCache;
#endif
FileEvalCache fileEvalCache;
SearchPath searchPath;