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:
parent
00017ace04
commit
97e85f94e5
3 changed files with 39 additions and 32 deletions
10
third_party/nix/src/libexpr/nixexpr.cc
vendored
10
third_party/nix/src/libexpr/nixexpr.cc
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue