1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Deduplicate filenames in Pos

This saves ~4 MiB of RAM for NixOS system instantiation, and ~18 MiB
for "nix-env -qa".
This commit is contained in:
Eelco Dolstra 2013-10-08 15:19:59 +02:00
parent b1e3b1a4ac
commit 9deb822180
3 changed files with 7 additions and 6 deletions

View file

@ -29,7 +29,7 @@ namespace nix {
SymbolTable & symbols;
Expr * result;
Path basePath;
Path path;
Symbol path;
string error;
Symbol sLetBody;
ParseData(EvalState & state)
@ -486,7 +486,7 @@ Expr * EvalState::parse(const char * text,
yyscan_t scanner;
ParseData data(*this);
data.basePath = basePath;
data.path = path;
data.path = data.symbols.create(path);
yylex_init(&scanner);
yy_scan_string(text, scanner);