Skip to content

Instantly share code, notes, and snippets.

@jbergstroem
Created November 22, 2016 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbergstroem/5654c1df0153d39eb56b629fdfdf7f1d to your computer and use it in GitHub Desktop.
Save jbergstroem/5654c1df0153d39eb56b629fdfdf7f1d to your computer and use it in GitHub Desktop.
diff --git a/deps/v8/src/compiler/instruction.h b/deps/v8/src/compiler/instruction.h
index b7c9430..ed9a5d7 100644
--- a/deps/v8/src/compiler/instruction.h
+++ b/deps/v8/src/compiler/instruction.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;
diff --git a/deps/v8/src/compiler/js-type-feedback.h b/deps/v8/src/compiler/js-type-feedback.h
index 84060f8..6b8ff5a 100644
--- a/deps/v8/src/compiler/js-type-feedback.h
+++ b/deps/v8/src/compiler/js-type-feedback.h
@@ -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_;
diff --git a/deps/v8/src/zone-containers.h b/deps/v8/src/zone-containers.h
index 8daf0dd..79b168c 100644
--- a/deps/v8/src/zone-containers.h
+++ b/deps/v8/src/zone-containers.h
@@ -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)) {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment