about summary refs log tree commit diff
path: root/src/libexpr/value-to-xml.cc
AgeCommit message (Collapse)AuthorFilesLines
2014-12-02 Make all ExternalValueBase functions constShea Levy1-1/+1
2014-12-02 Allow external code using libnixexpr to add typesShea Levy1-0/+11
Code that links to libnixexpr (e.g. plugins loaded with importNative, or nix-exec) may want to provide custom value types and operations on values of those types. For example, nix-exec is currently using sets where a custom IO value type would be more appropriate. This commit provides a generic hook for such types in the form of tExternal and the ExternalBase virtual class, which contains all functions necessary for libnixexpr's type-polymorphic functions (e.g. `showType`) to be implemented.
2012-03-05 Fix compilation on FreeBSDEelco Dolstra1-0/+1
http://hydra.nixos.org/build/2213576 Not sure why compilation doesn't fail on other platforms...
2010-10-24 * Keep attribute sets in sorted order to speed up attribute lookups.Eelco Dolstra1-1/+1
* Simplify the representation of attributes in the AST. * Change the behaviour of listToAttrs() in case of duplicate names.
2010-10-24 * Store attribute sets as a vector instead of a map (i.e. a red-blackEelco Dolstra1-7/+7
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 Dolstra1-7/+7
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-06-10 * builtins.toXML: propagate the string context. This is a regressionEelco Dolstra1-0/+1
from the old ATerm-based evaluator.
2010-05-07 (no commit message)Eelco Dolstra1-0/+2
2010-05-07 * Sync with the trunk.Eelco Dolstra1-19/+43
2010-05-07 * Keep track of the source positions of attributes.Eelco Dolstra1-5/+6
2010-04-15 * Store lists as lists of pointers to values rather than as lists ofEelco Dolstra1-1/+1
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 Dolstra1-4/+4
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 Dolstra1-29/+14
finished yet.
2010-04-07 * expr-to-xml -> value-to-xml.Eelco Dolstra1-0/+149