about summary refs log tree commit diff
path: root/src/libexpr/value.hh
AgeCommit message (Collapse)AuthorFilesLines
2016-08-30 Fix GC buildEelco Dolstra1-0/+5
2016-08-29 Add builtin function "partition"Eelco Dolstra1-0/+9
The implementation of "partition" in Nixpkgs is O(n^2) (because of the use of ++), and for some reason was causing stack overflows in multi-threaded evaluation (not sure why). This reduces "nix-env -qa --drv-path" runtime by 0.197s and memory usage by 298 MiB (in non-Boehm mode).
2016-08-29 nix path-info: Add --json flagEelco Dolstra1-1/+2
Also, factor out JSON generation from value-to-json.{cc,hh}, and support producing indented JSON.
2016-01-06 @eelco's feedback: downgrade to regular float for size, remove unused function.Christian Theune1-1/+1
2016-01-05 First hit at providing support for floats in the language.Christian Theune1-0/+11
2015-07-23 Optimize small listsEelco Dolstra1-3/+26
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.
2014-12-02 Make all ExternalValueBase functions constShea Levy1-10/+10
2014-12-02 Allow external code using libnixexpr to add typesShea Levy1-0/+50
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.
2014-10-09 mkList: Scrub betterEelco Dolstra1-2/+2
Clearing v.app.right was not enough, because the length field of a list only takes 32 bits, so the most significant 32 bits of v.app.left (a.k.a. v.thunk.env) would remain. This could cause Boehm GC to interpret it as a valid pointer. This change reduces maximum RSS for evaluating the ‘tested’ job in nixos/release-small.nix from 1.33 GiB to 0.80 GiB, and runtime by about 8%.
2014-10-09 TypoEelco Dolstra1-1/+1
2014-09-22 Add a function ‘valueSize’Eelco Dolstra1-0/+6
It returns the size of value, including all other values and environments reachable from it. It is intended for debugging memory consumption issues.
2014-01-21 Fix some clang warningsEelco Dolstra1-2/+2
2013-11-18 Add a primop unsafeGetAttrPos to return the position of an attributeEelco Dolstra1-0/+7
2013-08-19 Store Nix integers as longsEelco Dolstra1-5/+8
So on 64-bit systems, integers are now 64-bit. Fixes #158.
2013-08-06 Remove obsolete reference to ATermsEelco Dolstra1-3/+3
2012-12-13 fix use-after-free bug in mkString(Value&, Symbol&)Stuart Pernsteiner1-1/+1
2012-07-18 Use "#pragma once" to prevent repeated header file inclusionEelco Dolstra1-4/+1
2012-01-07 * Don't create thunks for simple constants (integers, strings, paths)Eelco Dolstra1-0/+155
and allocate them only once. * Move Value and related functions into value.hh.