1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 21:01:16 +02:00

* Use a symbol table to represent identifiers and attribute names

efficiently.  The symbol table ensures that there is only one copy
  of each symbol, thus allowing symbols to be compared efficiently
  using a pointer equality test.
This commit is contained in:
Eelco Dolstra 2010-04-13 12:25:42 +00:00
parent 10e8b1fd15
commit ac1e8f40d4
15 changed files with 228 additions and 101 deletions

View file

@ -20,10 +20,10 @@ bool parseOptionArg(const string & arg, Strings::iterator & i,
if (i == argsEnd) throw error;
string value = *i++;
Value & v(autoArgs[name]);
Value & v(autoArgs[state.symbols.create(name)]);
if (arg == "--arg")
state.mkThunk_(v, parseExprFromString(value, absPath(".")));
state.mkThunk_( v, parseExprFromString(state, value, absPath(".")));
else
mkString(v, value);