aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.cc
AgeCommit message (Collapse)Author
2015-07-23Optimize small listsEelco Dolstra
The value pointers of lists with 1 or 2 elements are now stored in the list value itself. In particular, this makes the "concatMap (x: if cond then [(f x)] else [])" idiom cheaper.
2015-07-17OCD: foreach -> C++11 ranged forEelco Dolstra
2014-08-20Use proper quotes everywhereEelco Dolstra
2013-11-18Support quoted attribute names in -AEelco Dolstra
This is requires if you have attribute names with dots in them. So you can now say: $ nix-instantiate '<nixos>' -A 'config.systemd.units."postgresql.service".text' --eval-only Fixes #151.
2013-10-24Rename "attribute sets" to "sets"Eelco Dolstra
We don't have any other kind of sets so calling them attribute sets is unnecessarily verbose.
2013-09-03Work on Values instead of ExprsEelco Dolstra
This prevents some duplicate evaluation in nix-env and nix-instantiate. Also, when traversing ~/.nix-defexpr, only read regular files with the extension .nix. Previously it was reading files like .../channels/binary-caches/<name>. The only reason this didn't cause problems is pure luck (namely, <name> shadows an actual Nix expression, the binary-caches files happen to be syntactically valid Nix expressions, and we iterate over the directory contents in just the right order).
2013-09-02Get rid of a signedness warningEelco Dolstra
2013-09-02Fix whitespaceEelco Dolstra
2012-09-19Templatise tokenizeString()Eelco Dolstra
2012-03-05Fix compilation on FreeBSDEelco Dolstra
http://hydra.nixos.org/build/2213576 Not sure why compilation doesn't fail on other platforms...
2010-10-24* Store attribute sets as a vector instead of a map (i.e. a red-blackEelco Dolstra
tree). This saves a lot of memory. The vector should be sorted so that names can be looked up using binary search, but this is not the case yet. (Surprisingly, looking up attributes using linear search doesn't have a big impact on performance.) Memory consumption for $ nix-instantiate /etc/nixos/nixos/tests -A bittorrent.test --readonly-mode on x86_64-linux with GC enabled is now 185 MiB (compared to 946 MiB on the trunk).
2010-10-22* Store Value nodes outside of attribute sets. I.e., Attr now storesEelco Dolstra
a pointer to a Value, rather than the Value directly. This improves the effectiveness of garbage collection a lot: if the Value is stored inside the set directly, then any live pointer to the Value causes all other attributes in the set to be live as well.
2010-05-07* Keep track of the source positions of attributes.Eelco Dolstra
2010-04-15* Store lists as lists of pointers to values rather than as lists ofEelco Dolstra
values. This improves sharing and gives another speed up. Evaluation of the NixOS system attribute is now almost 7 times faster than the old evaluator.
2010-04-13* Use a symbol table to represent identifiers and attribute namesEelco Dolstra
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.
2010-04-12* Don't use ATerms for the abstract syntax trees anymore. NotEelco Dolstra
finished yet.
2010-04-07* Update autoCallFunction() and findAlongAttrPath().Eelco Dolstra
2010-03-29* Started integrating the new evaluator.Eelco Dolstra
2007-01-13* Cleanup.Eelco Dolstra
2006-09-04* Use a proper namespace.Eelco Dolstra
* Optimise header file usage a bit. * Compile the parser as C++.
2006-08-23* Pass the autoArgs to findAlongAttrPath so that "nix-instantiateEelco Dolstra
foo.nix -A attr --arg name value" will work if (name, value) is needed in the evaluation leading up to "attr".
2006-07-28* `nix-instantiate ... --arg NAME VALUE': allow arguments to be passedEelco Dolstra
to functions from the command line. * nix-build: started removing backticks.
2006-07-26* Refactoring: get the selection path stuff out of getDerivations()Eelco Dolstra
and put it into a separate function findAlongAttrPath().