Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index e13a90a89515d5ec03b0644b63d27fe669820320..4dfed65489e58eb44b5831357f9711d9a26642e0 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -8854,6 +8854,19 @@ class StringHasher { |
| }; |
| +class IteratingStringHasher : public StringHasher { |
| + public: |
| + static inline uint32_t Hash(String* string, uint32_t seed); |
| + inline void VisitOneByteString(const uint8_t* chars, int length); |
| + inline void VisitTwoByteString(const uint16_t* chars, int length); |
| + |
| + private: |
| + inline IteratingStringHasher(int len, uint32_t seed) |
| + : StringHasher(len, seed) {} |
| + DISALLOW_COPY_AND_ASSIGN(IteratingStringHasher); |
| +}; |
|
vogelheim
2014/07/15 13:42:31
design nitpick: Not sure if exposing this class is
|
| + |
| + |
| // The characteristics of a string are stored in its map. Retrieving these |
| // few bits of information is moderately expensive, involving two memory |
| // loads where the second is dependent on the first. To improve efficiency |