From c5a932e20110008273acbde5066c4231293d3a54 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 28 Feb 2017 13:56:40 -0500 Subject: [PATCH 4/4] Fix compatibility with GCC 7 Signed-off-by: Stephen Gallagher --- deps/v8/src/objects-body-descriptors.h | 2 +- deps/v8/src/objects-inl.h | 21 +++++++++++++++++++++ deps/v8/src/objects.h | 20 ++++---------------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/deps/v8/src/objects-body-descriptors.h b/deps/v8/src/objects-body-descriptors.h index 91cb8883be88739eab2b10df71f6f0d08aab436e..a1c3634bd762d7e03b4c87d38aa14a9a3ce318e4 100644 --- a/deps/v8/src/objects-body-descriptors.h +++ b/deps/v8/src/objects-body-descriptors.h @@ -97,11 +97,11 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { IterateBodyImpl(heap, obj, start_offset, end_offset); } template static inline void IterateBody(HeapObject* obj, int object_size) { - IterateBody(obj); + IterateBody(obj); } }; // This class describes a body of an object of a variable size diff --git a/deps/v8/src/objects-inl.h b/deps/v8/src/objects-inl.h index b75dd1c969a498d66584143adf0f03140a69bbd6..690a338a023c25646863715466f777850bc7f437 100644 --- a/deps/v8/src/objects-inl.h +++ b/deps/v8/src/objects-inl.h @@ -34,10 +34,31 @@ #include "src/v8memory.h" namespace v8 { namespace internal { +template +uint32_t HashTable::Hash(Key key) { + if (Shape::UsesSeed) { + return Shape::SeededHash(key, GetHeap()->HashSeed()); + } else { + return Shape::Hash(key); + } +} + + +template +uint32_t HashTable::HashForObject(Key key, + Object* object) { + if (Shape::UsesSeed) { + return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); + } else { + return Shape::HashForObject(key, object); + } +} + + PropertyDetails::PropertyDetails(Smi* smi) { value_ = smi->value(); } diff --git a/deps/v8/src/objects.h b/deps/v8/src/objects.h index abced2d4bad50ca2e01373ac5ad3330cdbbdd682..e507dba665bfbd64f5ee5851b08a507de0a2519a 100644 --- a/deps/v8/src/objects.h +++ b/deps/v8/src/objects.h @@ -3259,26 +3259,14 @@ class HashTableBase : public FixedArray { template class HashTable : public HashTableBase { public: - // Wrapper methods - inline uint32_t Hash(Key key) { - if (Shape::UsesSeed) { - return Shape::SeededHash(key, GetHeap()->HashSeed()); - } else { - return Shape::Hash(key); - } - } - - inline uint32_t HashForObject(Key key, Object* object) { - if (Shape::UsesSeed) { - return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); - } else { - return Shape::HashForObject(key, object); - } - } + // Wrapper methods. Defined in src/objects-inl.h + // to break a cycle with src/heap/heap.h. + inline uint32_t Hash(Key key); + inline uint32_t HashForObject(Key key, Object* object); // Returns a new HashTable object. MUST_USE_RESULT static Handle New( Isolate* isolate, int at_least_space_for, MinimumCapacity capacity_option = USE_DEFAULT_MINIMUM_CAPACITY, -- 2.11.1