diff --git a/src/objects-body-descriptors.h b/src/objects-body-descriptors.h index 499c48a930..3eb3bb539e 100644 --- a/src/objects-body-descriptors.h +++ b/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); } static inline int SizeOf(Map* map, HeapObject* object) { return kSize; } diff --git a/src/objects-inl.h b/src/objects-inl.h index 406f49d996..a2e7a6d1fc 100644 --- a/src/objects-inl.h +++ b/src/objects-inl.h @@ -47,6 +47,27 @@ 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/src/objects/hash-table.h b/src/objects/hash-table.h index f3c68a82c5..71ce2a5613 100644 --- a/src/objects/hash-table.h +++ b/src/objects/hash-table.h @@ -138,22 +138,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(