about summary refs log tree commit diff
path: root/src/libexpr/symbol-table.hh
AgeCommit message (Collapse)AuthorFilesLines
2018-05-02 Fix some random -Wconversion warningsEelco Dolstra1-1/+1
2017-02-08 Include config.h implicitly with '-include config.h' in CFLAGSTuomas Tynkkynen1-2/+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!
2014-10-20 Improve printing of ASTsEelco Dolstra1-6/+0
2014-05-26 Use std::unordered_setEelco Dolstra1-9/+2
2013-10-24 Rename "attribute sets" to "sets"Eelco Dolstra1-5/+4
We don't have any other kind of sets so calling them attribute sets is unnecessarily verbose.
2013-10-08 printStats(): Print the size of the symbol table in bytesEelco Dolstra1-0/+2
2013-05-16 Show function names in error messagesEelco Dolstra1-4/+9
Functions in Nix are anonymous, but if they're assigned to a variable/attribute, we can use the variable/attribute name in error messages, e.g. while evaluating `concatMapStrings' at `/nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/pkgs/lib/strings.nix:18:25': ...
2012-07-18 Use "#pragma once" to prevent repeated header file inclusionEelco Dolstra1-4/+1
2010-10-24 * Store attribute sets as a vector instead of a map (i.e. a red-blackEelco Dolstra1-0/+2
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-04 * If std::tr1::unordered_set is unavailable, use std::set.Eelco Dolstra1-0/+9
2010-04-13 * Use std::tr1::unordered_set instead of std::set for the symbolEelco Dolstra1-1/+7
table. This gives a 10% speed increase on `nix-instantiate /etc/nixos/nixos -A system --readonly-mode'.
2010-04-13 * Use a symbol table to represent identifiers and attribute namesEelco Dolstra1-0/+75
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.