| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -99,7 +99,7 @@ class FixedBodyDescriptor final : public BodyDescriptorBase { | |||
| 99 | 99 | ||
| 100 | 100 | template <typename StaticVisitor> | |
| 101 | 101 | static inline void IterateBody(HeapObject* obj, int object_size) { | |
| 102 | - IterateBody(obj); | ||
| 102 | + IterateBody<StaticVisitor>(obj); | ||
| 103 | 103 | } | |
| 104 | 104 | }; | |
| 105 | 105 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -46,6 +46,27 @@ | |||
| 46 | 46 | namespace v8 { | |
| 47 | 47 | namespace internal { | |
| 48 | 48 | ||
| 49 | + template <typename Derived, typename Shape, typename Key> | ||
| 50 | + uint32_t HashTable<Derived, Shape, Key>::Hash(Key key) { | ||
| 51 | + if (Shape::UsesSeed) { | ||
| 52 | + return Shape::SeededHash(key, GetHeap()->HashSeed()); | ||
| 53 | + } else { | ||
| 54 | + return Shape::Hash(key); | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + | ||
| 59 | + template <typename Derived, typename Shape, typename Key> | ||
| 60 | + uint32_t HashTable<Derived, Shape, Key>::HashForObject(Key key, | ||
| 61 | + Object* object) { | ||
| 62 | + if (Shape::UsesSeed) { | ||
| 63 | + return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | ||
| 64 | + } else { | ||
| 65 | + return Shape::HashForObject(key, object); | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + | ||
| 49 | 70 | PropertyDetails::PropertyDetails(Smi* smi) { | |
| 50 | 71 | value_ = smi->value(); | |
| 51 | 72 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -135,22 +135,10 @@ class HashTable : public HashTableBase { | |||
| 135 | 135 | public: | |
| 136 | 136 | typedef Shape ShapeT; | |
| 137 | 137 | ||
| 138 | - // Wrapper methods | ||
| 139 | - inline uint32_t Hash(Key key) { | ||
| 140 | - if (Shape::UsesSeed) { | ||
| 141 | - return Shape::SeededHash(key, GetHeap()->HashSeed()); | ||
| 142 | - } else { | ||
| 143 | - return Shape::Hash(key); | ||
| 144 | - } | ||
| 145 | - } | ||
| 146 | - | ||
| 147 | - inline uint32_t HashForObject(Key key, Object* object) { | ||
| 148 | - if (Shape::UsesSeed) { | ||
| 149 | - return Shape::SeededHashForObject(key, GetHeap()->HashSeed(), object); | ||
| 150 | - } else { | ||
| 151 | - return Shape::HashForObject(key, object); | ||
| 152 | - } | ||
| 153 | - } | ||
| 138 | + // Wrapper methods. Defined in src/objects-inl.h | ||
| 139 | + // to break a cycle with src/heap/heap.h. | ||
| 140 | + inline uint32_t Hash(Key key); | ||
| 141 | + inline uint32_t HashForObject(Key key, Object* object); | ||
| 154 | 142 | ||
| 155 | 143 | // Returns a new HashTable object. | |
| 156 | 144 | MUST_USE_RESULT static Handle<Derived> New( | |
| Back | FazBrowse Home | New Git URL |
0 commit comments