about summary refs log tree commit diff
path: root/src/libexpr/value.hh
AgeCommit message (Collapse)AuthorFilesLines
2017-04-25 Restructure installables handling in the "nix" commandEelco Dolstra1-0/+8
2017-03-24 use std::tuple for ValueMap allocatorDaiderd Jordan1-1/+1
2017-02-08 Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen1-1/+0
Because config.h can #define things like _FILE_OFFSET_BITS=64 and not every compilation unit includes config.h, we currently compile half of Nix with _FILE_OFFSET_BITS=64 and other half with _FILE_OFFSET_BITS unset. This causes major havoc with the Settings class on e.g. 32-bit ARM, where different compilation units disagree with the struct layout. E.g.: diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc @@ -166,6 +166,8 @@ void Settings::update() _get(useSubstitutes, "build-use-substitutes"); + fprintf(stderr, "at Settings::update(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); _get(buildUsersGroup, "build-users-group"); diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -138,6 +138,8 @@ void RemoteStore::initConnection(Connection & conn) void RemoteStore::setOptions(Connection & conn) { + fprintf(stderr, "at RemoteStore::setOptions(): &useSubstitutes = %p\n", &nix::settings.useSubstitutes); conn.to << wopSetOptions Gave me: at Settings::update(): &useSubstitutes = 0xb6e5c5cb at RemoteStore::setOptions(): &useSubstitutes = 0xb6e5c5c7 That was not a fun one to debug!
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.