svn commit: r412412 - head/www/node/files
Dimitry Andric
dim at FreeBSD.org
Sat Apr 2 15:51:20 UTC 2016
Author: dim (src committer)
Date: Sat Apr 2 15:51:18 2016
New Revision: 412412
URL: https://svnweb.freebsd.org/changeset/ports/412412
Log:
During the exp-run in bug 208158, it was found that www/node gives
errors with libc++ 3.8.0 [1]:
/usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type"
static_assert((is_same<typename allocator_type::value_type, value_type>::value),
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/v8/src/compiler/js-type-feedback.h:41:21: note: in instantiation of template class 'std::__1::map<unsigned int, v8::internal::TypeFeedbackId, std::__1::less<unsigned int>, v8::internal::zone_allocator<v8::internal::TypeFeedbackId> >' requested here
TypeFeedbackIdMap type_feedback_id_map_;
^
This is because libc++ 3.8.0 has added these sanity checks for custom
std::map allocators, which *must* be of the type std::pair<const Key,
Value>. I fixed the few std::map instances in the node source by adding
this to their allocator types.
Approved by: linpct at gmail.com (maintainer)
PR: 208270
MFH: 2016Q2
Added:
head/www/node/files/patch-deps_v8_src_compiler_instruction.h (contents, props changed)
head/www/node/files/patch-deps_v8_src_compiler_js-type-feedback.h (contents, props changed)
head/www/node/files/patch-deps_v8_src_zone-containers.h (contents, props changed)
Added: head/www/node/files/patch-deps_v8_src_compiler_instruction.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node/files/patch-deps_v8_src_compiler_instruction.h Sat Apr 2 15:51:18 2016 (r412412)
@@ -0,0 +1,11 @@
+--- deps/v8/src/compiler/instruction.h.orig 2016-03-16 21:22:58.000000000 +0100
++++ deps/v8/src/compiler/instruction.h 2016-03-24 23:27:23.004854000 +0100
+@@ -1011,7 +1011,7 @@ class InstructionBlock final : public Zo
+
+ 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;
Added: head/www/node/files/patch-deps_v8_src_compiler_js-type-feedback.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node/files/patch-deps_v8_src_compiler_js-type-feedback.h Sat Apr 2 15:51:18 2016 (r412412)
@@ -0,0 +1,15 @@
+--- deps/v8/src/compiler/js-type-feedback.h.orig 2016-03-16 21:22:58.000000000 +0100
++++ deps/v8/src/compiler/js-type-feedback.h 2016-03-24 22:54:54.529827000 +0100
+@@ -33,9 +33,10 @@ class JSTypeFeedbackTable : public ZoneO
+ 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_;
Added: head/www/node/files/patch-deps_v8_src_zone-containers.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/node/files/patch-deps_v8_src_zone-containers.h Sat Apr 2 15:51:18 2016 (r412412)
@@ -0,0 +1,18 @@
+--- deps/v8/src/zone-containers.h.orig 2016-03-16 21:22:58.000000000 +0100
++++ deps/v8/src/zone-containers.h 2016-03-24 23:34:37.741885000 +0100
+@@ -114,12 +114,12 @@ class ZoneSet : public std::set<K, Compa
+ // 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)) {}
+ };
+
+
More information about the svn-ports-head
mailing list