refactor(3p/nix/libexpr): Use absl::node_hash_set in SymbolTable

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.
This commit is contained in:
Vincent Ambo 2020-05-21 04:53:09 +01:00
parent 00017ace04
commit 97e85f94e5
3 changed files with 39 additions and 32 deletions

View file

@ -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