From 19597ff341e55fef78c7fae794574785bfde9acd Mon Sep 17 00:00:00 2001 From: Elvis Pranskevichus Date: Thu, 7 Dec 2017 09:25:03 -0500 Subject: [PATCH] GCC-7 compatibility --- .../Source/platform/graphics/gpu/SharedGpuContext.h | 1 + third_party/WebKit/Source/wtf/LinkedHashSet.h | 1 + v8/src/objects-body-descriptors.h | 2 +- v8/src/objects-inl.h | 19 +++++++++++++++++++ v8/src/objects.h | 20 ++++---------------- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h index 7c32007346..dd2d637085 100644 --- a/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h +++ b/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContext.h @@ -5,6 +5,7 @@ #include "platform/PlatformExport.h" #include "wtf/ThreadSpecific.h" +#include #include namespace gpu { diff --git a/third_party/WebKit/Source/wtf/LinkedHashSet.h b/third_party/WebKit/Source/wtf/LinkedHashSet.h index 65f5100a8f..7c6c9fc5d8 100644 --- a/third_party/WebKit/Source/wtf/LinkedHashSet.h +++ b/third_party/WebKit/Source/wtf/LinkedHashSet.h @@ -630,6 +630,7 @@ inline LinkedHashSet& LinkedHashSet::operator=( return *this; } +inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b); template inline void LinkedHashSet::swap(LinkedHashSet& other) { m_impl.swap(other.m_impl); diff --git a/v8/src/objects-body-descriptors.h b/v8/src/objects-body-descriptors.h index 91cb8883be..a1c3634bd7 100644 --- a/v8/src/objects-body-descriptors.h +++ b/v8/src/objects-body-descriptors.h @@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { template static inline void IterateBody(HeapObject* obj, int object_size) { - IterateBody(obj); + IterateBody(obj); } }; diff --git a/v8/src/objects-inl.h b/v8/src/objects-inl.h index 1a8274cbf1..6c4b13c0d0 100644 --- a/v8/src/objects-inl.h +++ b/v8/src/objects-inl.h @@ -39,6 +39,25 @@ 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/v8/src/objects.h b/v8/src/objects.h index 747a4f0511..b9279640e2 100644 --- a/v8/src/objects.h +++ b/v8/src/objects.h @@ -3531,22 +3531,10 @@ class HashTable : public HashTableBase { public: typedef Shape ShapeT; - // 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( -- 2.14.3