summaryrefslogtreecommitdiff
blob: 7a7ded275cd0501bd4c7e5ca90b6b52719a7daac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
From 19597ff341e55fef78c7fae794574785bfde9acd Mon Sep 17 00:00:00 2001
From: Elvis Pranskevichus <elvis@magic.io>
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 <functional>
 #include <memory>
 
 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<T, U, V, W>& LinkedHashSet<T, U, V, W>::operator=(
   return *this;
 }
 
+inline void swapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b);
 template <typename T, typename U, typename V, typename W>
 inline void LinkedHashSet<T, U, V, W>::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 <typename StaticVisitor>
   static inline void IterateBody(HeapObject* obj, int object_size) {
-    IterateBody(obj);
+    IterateBody<StaticVisitor>(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 <typename Derived, typename Shape, typename Key>
+uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) {
+  if (Shape::UsesSeed) {
+    return Shape::SeededHash(key, GetHeap()->HashSeed());
+  } else {
+    return Shape::Hash(key);
+  }
+}
+
+template <typename Derived, typename Shape, typename Key>
+uint32_t HashTable<Derived, Shape, Key>::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<Derived> New(
-- 
2.14.3