about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
AgeCommit message (Collapse)AuthorFilesLines
2012-02-04 * Inline some functions and get rid of the indirection throughEelco Dolstra1-108/+23
EvalState::eval(). This gives a 12% speedup on ‘nix-instantiate /etc/nixos/nixos/ -A system --readonly-mode’ (from 1.01s to 0.89s).
2012-02-04 * Print elapsed evaluation time.Eelco Dolstra1-1/+9
2012-01-19 * Allow comparisons between derivations by comparing the outPathEelco Dolstra1-2/+14
attributes.
2012-01-07 * Don't create thunks for simple constants (integers, strings, paths)Eelco Dolstra1-18/+26
and allocate them only once. * Move Value and related functions into value.hh.
2012-01-04 * Remove dead code.Eelco Dolstra1-2/+0
2012-01-04 * Don't use dynamic_cast, it's very slow. "nix-instantiateEelco Dolstra1-22/+21
/etc/nixos/nixos -A system" spent about 10% of its time in dynamic_cast.
2012-01-03 * Move the implementation of the ‘derivation’ primop into a separateEelco Dolstra1-2/+2
file.
2011-11-06 Remove the unused sCurrentOutput symbolShea Levy1-1/+0
2011-11-06 Merge from trunkShea Levy1-3/+6
2011-10-27 * In printValueAsXML, handle the case where a "type" attribute is notEelco Dolstra1-3/+6
a string. This happens in the NixOS option system. * Remove a bogus comparison of a unsigned integer with -1.
2011-09-16 Add an sCurrentOutput member to EvalStateShea Levy1-0/+1
2011-08-06 * Cache the result of file evaluation (i.e, memoize evalFile()). ThisEelco Dolstra1-11/+13
prevents files from being evaluated and stored as values multiple times. For instance, evaluation of the ‘system’ attribute in NixOS causes ‘nixpkgs/pkgs/lib/lists.nix’ to be evaluated 2019 times. Caching gives a modest speedup and a decent memory footprint reduction (e.g., from 1.44s to 1.28s, and from 81 MiB to 59 MiB with GC_INITIAL_HEAP_SIZE=100000 on my system).
2011-08-06 * Remove a debug statement.Eelco Dolstra1-1/+0
2011-08-06 * Add the Nix corepkgs to the end of the search path. This makes itEelco Dolstra1-0/+2
possible for other Nix expressions to use corepkgs (mostly useful for the buildenv function).
2011-08-06 * Add a Nix expression search path feature. Paths between angleEelco Dolstra1-0/+6
brackets, e.g. import <nixpkgs/pkgs/lib> are resolved by looking them up relative to the elements listed in the search path. This allows us to get rid of hacks like import "${builtins.getEnv "NIXPKGS_ALL"}/pkgs/lib" The search path can be specified through the ‘-I’ command-line flag and through the colon-separated ‘NIX_PATH’ environment variable, e.g., $ nix-build -I /etc/nixos ... If a file is not found in the search path, an error message is lazily thrown.
2011-08-06 * Refactoring: move parseExprFromFile() and parseExprFromString() intoEelco Dolstra1-7/+2
the EvalState class.
2011-07-13 * Allow a default value in attribute selection by writingEelco Dolstra1-6/+13
x.y.z or default (as originally proposed in https://mail.cs.uu.nl/pipermail/nix-dev/2009-September/002989.html). For instance, an expression like stdenv.lib.attrByPath ["features" "ckSched"] false args can now be written as args.features.ckSched or false
2011-07-06 * Change the right-hand side of the ‘.’ operator from an attribute toEelco Dolstra1-12/+26
an attribute path. This is a refactoring to support default values.
2011-07-06 * In the ‘?’ operator, allow attribute paths. For instance, you canEelco Dolstra1-3/+19
write ‘attrs ? a.b’ to test whether ‘attrs’ has an attribute ‘a’ containing an attribute ‘b’. This is more convenient than ‘attrs ? a && attrs.a ? b’. Slight change in the semantics: it's no longer an error if the left-hand side of ‘?’ is not an attribute set. In that case it just returns false. So, ‘null ? foo’ no longer throws an error.
2011-02-10 * Don't allocate a big initial GC address space on machines withEelco Dolstra1-11/+24
little RAM. Even if the memory isn't actually used, it can cause problems with the overcommit heuristics in the kernel. So use a VM space of 25% of RAM, up to 384 MB.
2011-02-09 * Don't call GC_expand_hp unless we're actually using the garbageEelco Dolstra1-0/+18
collector.
2010-10-28 * new(UseGC) is inexplicably slower than GC_MALLOC, so prefer theEelco Dolstra1-4/+4
latter.
2010-10-28 * Handle out of memory condition.Eelco Dolstra1-5/+5
2010-10-24 * When allocating an attribute set, reserve enough space for allEelco Dolstra1-11/+5
elements. This prevents the vector from having to resize itself.
2010-10-24 * Keep attribute sets in sorted order to speed up attribute lookups.Eelco Dolstra1-65/+82
* Simplify the representation of attributes in the AST. * Change the behaviour of listToAttrs() in case of duplicate names.
2010-10-24 * Don't create thunks for variable lookups (if possible). ThisEelco Dolstra1-14/+57
significantly reduces the number of values allocated (e.g. from 8.7m to 4.9m for the Bittorrent test).
2010-10-24 * Store attribute sets as a vector instead of a map (i.e. a red-blackEelco Dolstra1-35/+49
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-23 * Fix compiling without Boehm.Eelco Dolstra1-10/+8
* Fix the stats.
2010-10-23 * Optimise string constants by putting them in the symbol table.Eelco Dolstra1-1/+9
2010-10-23 * Make Value smaller by not storing redundant PrimOp info.Eelco Dolstra1-16/+21
* Clear pointers in Values after overwriting them to make sure that no objects are kept alive unnecessarily.
2010-10-23 * Remove allocValues().Eelco Dolstra1-17/+5
2010-10-22 * In environments, store pointers to values rather than values. ThisEelco Dolstra1-26/+24
improves GC effectiveness a bit more (because a live value doesn't keep other values in the environment plus the parent environments alive), and removes the need for copy nodes.
2010-10-22 * Store Value nodes outside of attribute sets. I.e., Attr now storesEelco Dolstra1-41/+56
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-10-22 * Make building against the Boehm GC a configure option.Eelco Dolstra1-5/+18
2010-10-20 * Keep some more stats.Eelco Dolstra1-0/+9
2010-10-20 * Use the Boehm garbage collector to reclaim unused memory in the NixEelco Dolstra1-9/+14
expression evaluator.
2010-08-27 * Oops - "null" was displayed as "true".Eelco Dolstra1-1/+1
2010-08-02 * Optimisation in the // operator: if one of the sets is empty, returnEelco Dolstra1-6/+8
the other set.
2010-06-10 * builtins.toXML: propagate the string context. This is a regressionEelco Dolstra1-5/+9
from the old ATerm-based evaluator.
2010-06-02 (no commit message)Eelco Dolstra1-0/+1
2010-05-18 * The << operator on values should be const.Eelco Dolstra1-1/+1
2010-05-15 * Restore the __overrides feature that was lost somewhere in theEelco Dolstra1-2/+19
fast-eval branch.
2010-05-12 * Print attributes in sorted order.Eelco Dolstra1-2/+7
2010-05-07 * Store position info for inherited attributes.Eelco Dolstra1-10/+12
2010-05-07 * Keep track of the source positions of attributes.Eelco Dolstra1-22/+37
2010-05-06 * Store attribute positions in the AST and report duplicate attributeEelco Dolstra1-13/+3
errors with position info. * For all positions, use the position of the first character of the first token, rather than the last character of the first token plus one.
2010-04-22 * Simplify the implementation of `with'. This gives a 7% speedup inEelco Dolstra1-25/+9
evaluating the NixOS system configuration.
2010-04-22 * String equality tests should take the context into account. All theEelco Dolstra1-3/+11
evaluation test cases now succeed.
2010-04-21 * Fixed builtins.genericClosure.Eelco Dolstra1-3/+7
2010-04-21 * Store user environment manifests as a Nix expression inEelco Dolstra1-2/+9
$out/manifest.nix rather than as an ATerm. (Hm, I thought I committed this two days ago...)