Permalink
Browse files

deps: fix build with libc++ 3.8.0

Make sure the map allocators are of the same type. This fixes
building Node.js 4.x on libc++ 3.8.0 (for instance FreeBSD 11).

Upstream bug/patch: https://bugs.freebsd.org/208467

PR-URL: #9763
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
  • Loading branch information...
jbergstroem authored and MylesBorins committed Nov 23, 2016
1 parent 9144d37 commit c1effb1255a7137316f9d6a8c12263adb40acbdc
Showing with 7 additions and 6 deletions.
  1. +1 −1 deps/v8/src/compiler/instruction.h
  2. +3 −2 deps/v8/src/compiler/js-type-feedback.h
  3. +3 −3 deps/v8/src/zone-containers.h
@@ -1012,7 +1012,7 @@ class InstructionBlock final : public ZoneObject {
typedef ZoneDeque<Constant> ConstantDeque;
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<ReferenceMap*> ReferenceMapDeque;
@@ -33,9 +33,10 @@ class JSTypeFeedbackTable : public ZoneObject {
private:
friend class JSTypeFeedbackSpecializer;
typedef std::map<NodeId, TypeFeedbackId, std::less<NodeId>,
zone_allocator<TypeFeedbackId> > TypeFeedbackIdMap;
zone_allocator<std::pair<const NodeId, TypeFeedbackId> > >
TypeFeedbackIdMap;
typedef std::map<NodeId, FeedbackVectorICSlot, std::less<NodeId>,
zone_allocator<FeedbackVectorICSlot> >
zone_allocator<std::pair<const NodeId, FeedbackVectorICSlot> > >
FeedbackVectorICSlotMap;
TypeFeedbackIdMap type_feedback_id_map_;
@@ -114,12 +114,12 @@ class ZoneSet : public std::set<K, Compare, zone_allocator<K>> {
// a zone allocator.
template <typename K, typename V, typename Compare = std::less<K>>
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:
// Constructs an empty map.
explicit ZoneMap(Zone* zone)
: std::map<K, V, Compare, zone_allocator<std::pair<K, V>>>(
Compare(), zone_allocator<std::pair<K, V>>(zone)) {}
: std::map<K, V, Compare, zone_allocator<std::pair<const K, V>>>(
Compare(), zone_allocator<std::pair<const K, V>>(zone)) {}
};

0 comments on commit c1effb1

Please sign in to comment.