Add bucket_count parameter to ZoneUnorderedSet

Change-Id: Ie20daeac36c804455b97e1e769417dfe9b5ef4ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2453592
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70359}
This commit is contained in:
Shu-yu Guo 2020-10-06 11:08:42 -07:00 committed by Commit Bot
parent 508612a4dd
commit e02656eaed

View File

@ -176,9 +176,9 @@ class ZoneUnorderedSet
: public std::unordered_set<K, Hash, KeyEqual, ZoneAllocator<K>> {
public:
// Constructs an empty map.
explicit ZoneUnorderedSet(Zone* zone)
explicit ZoneUnorderedSet(Zone* zone, size_t bucket_count = 100)
: std::unordered_set<K, Hash, KeyEqual, ZoneAllocator<K>>(
100, Hash(), KeyEqual(), ZoneAllocator<K>(zone)) {}
bucket_count, Hash(), KeyEqual(), ZoneAllocator<K>(zone)) {}
};
// A wrapper subclass for std::multimap to make it easy to construct one that