Commit | Line | Data |
---|---|---|
c4acdcba VM |
1 | diff -upr chromium-59.0.3071.86.orig/v8/src/objects/hash-table.h chromium-59.0.3071.86/v8/src/objects/hash-table.h |
2 | --- chromium-59.0.3071.86.orig/v8/src/objects/hash-table.h 2017-06-05 22:04:29.000000000 +0300 | |
3 | +++ chromium-59.0.3071.86/v8/src/objects/hash-table.h 2017-06-06 14:35:41.558245559 +0300 | |
4 | @@ -135,22 +135,10 @@ class HashTable : public HashTableBase { | |
5 | public: | |
6 | typedef Shape ShapeT; | |
7 | ||
8 | - // Wrapper methods | |
9 | - inline uint32_t Hash(Key key) { | |
10 | - if (Shape::UsesSeed) { | |
11 | - return Shape::SeededHash(key, GetHeap()->HashSeed()); | |
12 | - } else { | |
13 | - return Shape::Hash(key); | |
14 | - } | |
15 | - } | |
16 | - | |
17 | - inline uint32_t HashForObject(Key key, Object* object) { | |
18 | - if (Shape::UsesSeed) { | |
19 | - return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | |
20 | - } else { | |
21 | - return Shape::HashForObject(key, object); | |
22 | - } | |
23 | - } | |
24 | + // Wrapper methods. Defined in src/objects-inl.h | |
25 | + // to break a cycle with src/heap/heap.h. | |
26 | + inline uint32_t Hash(Key key); | |
27 | + inline uint32_t HashForObject(Key key, Object* object); | |
28 | ||
29 | // Returns a new HashTable object. | |
30 | MUST_USE_RESULT static Handle<Derived> New( | |
31 | diff -upr chromium-59.0.3071.86.orig/v8/src/objects-body-descriptors.h chromium-59.0.3071.86/v8/src/objects-body-descriptors.h | |
32 | --- chromium-59.0.3071.86.orig/v8/src/objects-body-descriptors.h 2017-06-05 22:04:29.000000000 +0300 | |
33 | +++ chromium-59.0.3071.86/v8/src/objects-body-descriptors.h 2017-06-06 14:35:41.554912132 +0300 | |
34 | @@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public | |
35 | ||
36 | template <typename StaticVisitor> | |
37 | static inline void IterateBody(HeapObject* obj, int object_size) { | |
38 | - IterateBody(obj); | |
39 | + IterateBody<StaticVisitor>(obj); | |
40 | } | |
41 | }; | |
42 | ||
43 | diff -upr chromium-59.0.3071.86.orig/v8/src/objects-inl.h chromium-59.0.3071.86/v8/src/objects-inl.h | |
44 | --- chromium-59.0.3071.86.orig/v8/src/objects-inl.h 2017-06-05 22:04:29.000000000 +0300 | |
45 | +++ chromium-59.0.3071.86/v8/src/objects-inl.h 2017-06-06 14:35:41.558245559 +0300 | |
46 | @@ -46,6 +46,27 @@ | |
47 | namespace v8 { | |
48 | namespace internal { | |
49 | ||
50 | +template <typename Derived, typename Shape, typename Key> | |
51 | +uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) { | |
52 | + if (Shape::UsesSeed) { | |
53 | + return Shape::SeededHash(key, GetHeap()->HashSeed()); | |
54 | + } else { | |
55 | + return Shape::Hash(key); | |
56 | + } | |
57 | +} | |
58 | + | |
59 | + | |
60 | +template <typename Derived, typename Shape, typename Key> | |
61 | +uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key, | |
62 | + Object* object) { | |
63 | + if (Shape::UsesSeed) { | |
64 | + return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | |
65 | + } else { | |
66 | + return Shape::HashForObject(key, object); | |
67 | + } | |
68 | +} | |
69 | + | |
70 | + | |
71 | PropertyDetails::PropertyDetails(Smi* smi) { | |
72 | value_ = smi->value(); | |
73 | } |