mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51: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:
parent
10e8b1fd15
commit
ac1e8f40d4
15 changed files with 228 additions and 101 deletions
|
@ -45,7 +45,7 @@ void findAlongAttrPath(EvalState & state, const string & attrPath,
|
|||
format("the expression selected by the selection path `%1%' should be an attribute set but is %2%")
|
||||
% curPath % showType(v));
|
||||
|
||||
Bindings::iterator a = v.attrs->find(attr);
|
||||
Bindings::iterator a = v.attrs->find(state.symbols.create(attr));
|
||||
if (a == v.attrs->end())
|
||||
throw Error(format("attribute `%1%' in selection path `%2%' not found") % attr % curPath);
|
||||
v = a->second;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue