Commit 96cb9098 authored by thakis's avatar thakis Committed by Commit bot

Allocators for map<K, V> need to allocate pair<const K, V>.

BUG=chromium:562227
LOG=n

Review URL: https://codereview.chromium.org/1479893002

Cr-Commit-Position: refs/heads/master@{#32360}
parent e03cadab
...@@ -1083,7 +1083,7 @@ class InstructionBlock final : public ZoneObject { ...@@ -1083,7 +1083,7 @@ class InstructionBlock final : public ZoneObject {
typedef ZoneDeque<Constant> ConstantDeque; typedef ZoneDeque<Constant> ConstantDeque;
typedef std::map<int, Constant, std::less<int>, typedef std::map<int, Constant, std::less<int>,
zone_allocator<std::pair<int, Constant> > > ConstantMap; zone_allocator<std::pair<const int, Constant> > > ConstantMap;
typedef ZoneDeque<Instruction*> InstructionDeque; typedef ZoneDeque<Instruction*> InstructionDeque;
typedef ZoneDeque<ReferenceMap*> ReferenceMapDeque; typedef ZoneDeque<ReferenceMap*> ReferenceMapDeque;
......
...@@ -114,12 +114,12 @@ class ZoneSet : public std::set<K, Compare, zone_allocator<K>> { ...@@ -114,12 +114,12 @@ class ZoneSet : public std::set<K, Compare, zone_allocator<K>> {
// a zone allocator. // a zone allocator.
template <typename K, typename V, typename Compare = std::less<K>> template <typename K, typename V, typename Compare = std::less<K>>
class ZoneMap class ZoneMap
: public std::map<K, V, Compare, zone_allocator<std::pair<K, V>>> { : public std::map<K, V, Compare, zone_allocator<std::pair<const K, V>>> {
public: public:
// Constructs an empty map. // Constructs an empty map.
explicit ZoneMap(Zone* zone) explicit ZoneMap(Zone* zone)
: std::map<K, V, Compare, zone_allocator<std::pair<K, V>>>( : std::map<K, V, Compare, zone_allocator<std::pair<const K, V>>>(
Compare(), zone_allocator<std::pair<K, V>>(zone)) {} Compare(), zone_allocator<std::pair<const K, V>>(zone)) {}
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment