1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 21:16:02 +01:00

hashmaps with string keys: add transparent lookups

This commit is contained in:
Philipp Otterbein 2025-09-07 14:16:32 +02:00 committed by Jörg Thalheim
parent 9f2b6a1b94
commit 9dbc2cae4f
3 changed files with 22 additions and 12 deletions

View file

@ -474,7 +474,8 @@ private:
LookupPath lookupPath;
boost::unordered_flat_map<std::string, std::optional<SourcePath>> lookupPathResolved;
boost::unordered_flat_map<std::string, std::optional<SourcePath>, StringViewHash, std::equal_to<>>
lookupPathResolved;
/**
* Cache used by prim_match().
@ -751,8 +752,8 @@ public:
boost::unordered_flat_map<
std::string,
Value *,
std::hash<std::string>,
std::equal_to<std::string>,
StringViewHash,
std::equal_to<>,
traceable_allocator<std::pair<const std::string, Value *>>>
internalPrimOps;
@ -1019,7 +1020,7 @@ private:
bool countCalls;
typedef boost::unordered_flat_map<std::string, size_t> PrimOpCalls;
typedef boost::unordered_flat_map<std::string, size_t, StringViewHash, std::equal_to<>> PrimOpCalls;
PrimOpCalls primOpCalls;
typedef boost::unordered_flat_map<ExprLambda *, size_t> FunctionCalls;