From 85a05a6f38b997082b4a88d7b80dfa1c1c35a88d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 23 May 2020 05:07:20 +0100 Subject: fix(3p/nix/libexpr): Remove the global empty attribute set In the change to the backing structure of attribute sets, the requirement to manually balance the capacity of the structure went away. This is a) because Abseil's data structures manage this on their own, and b) because the new Bindings class is allocated using `new (GC)` rather than writing into a predefined memory area. As part of this change functions related to the capacity were deprecated and set to 0 values, which in turn caused the creation of new attribute sets to return the same (mutable!) default value in various cases, leading to "side effects" that caused evaluation failures. FWIW, I'm not sure if this optimisation had noticeable performance impact, but while untangling libexpr it definitely doesn't help trying to follow what it's doing - so bye, bye! --- third_party/nix/src/libexpr/eval.hh | 2 -- 1 file changed, 2 deletions(-) (limited to 'third_party/nix/src/libexpr/eval.hh') diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index 03dd275edc4e..531294c93ca2 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -75,8 +75,6 @@ class EvalState { mode. */ std::optional allowedPaths; - Value vEmptySet; - const ref store; private: -- cgit 1.4.1