about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/nixexpr.cc
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-05-21T03·53+0100
committerVincent Ambo <tazjin@google.com>2020-05-21T04·09+0100
commit97e85f94e5ee7e6c8340011757a71222b8091cda (patch)
treeeb46a1e2a1b06508a30f7b46aa050bc51b24d2b6 /third_party/nix/src/libexpr/nixexpr.cc
parent00017ace042d183400be78269e99e2952746cce1 (diff)
refactor(3p/nix/libexpr): Use absl::node_hash_set in SymbolTable r/794
This replaces the previous use of std::unordered_set with
absl::node_hash_set.

This type was chosen because the current implementation requires
pointer stability.

This does not yet touch the 'Attr' struct.

As a bonus, the implementation of the SymbolTable struct is now
consolidated into a single header/implementation file pair.
Diffstat (limited to 'third_party/nix/src/libexpr/nixexpr.cc')
-rw-r--r--third_party/nix/src/libexpr/nixexpr.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/third_party/nix/src/libexpr/nixexpr.cc b/third_party/nix/src/libexpr/nixexpr.cc
index 22be923404a0..d7b1a0fdd572 100644
--- a/third_party/nix/src/libexpr/nixexpr.cc
+++ b/third_party/nix/src/libexpr/nixexpr.cc
@@ -413,14 +413,4 @@ string ExprLambda::showNamePos() const {
       .str();
 }
 
-/* Symbol table. */
-
-size_t SymbolTable::totalSize() const {
-  size_t n = 0;
-  for (auto& i : symbols) {
-    n += i.size();
-  }
-  return n;
-}
-
 }  // namespace nix