Index: src/heap.h |
=================================================================== |
--- src/heap.h (revision 10328) |
+++ src/heap.h (working copy) |
@@ -96,6 +96,7 @@ |
V(FixedArray, single_character_string_cache, SingleCharacterStringCache) \ |
V(FixedArray, string_split_cache, StringSplitCache) \ |
V(Object, termination_exception, TerminationException) \ |
+ V(Smi, string_hash_seed, StringHashSeed) \ |
V(Map, string_map, StringMap) \ |
V(Map, symbol_map, SymbolMap) \ |
V(Map, cons_string_map, ConsStringMap) \ |
@@ -954,8 +955,7 @@ |
// Please note this function does not perform a garbage collection. |
MUST_USE_RESULT MaybeObject* LookupSymbol(Vector<const char> str); |
MUST_USE_RESULT MaybeObject* LookupAsciiSymbol(Vector<const char> str); |
- MUST_USE_RESULT MaybeObject* LookupTwoByteSymbol( |
- Vector<const uc16> str); |
+ MUST_USE_RESULT MaybeObject* LookupTwoByteSymbol(Vector<const uc16> str); |
MUST_USE_RESULT MaybeObject* LookupAsciiSymbol(const char* str) { |
return LookupSymbol(CStrVector(str)); |
} |
@@ -1506,6 +1506,12 @@ |
return idle_notification_will_schedule_next_gc_; |
} |
+ uint32_t StringHashSeed() { |
+ uint32_t seed = static_cast<uint32_t>(string_hash_seed()->value()); |
+ ASSERT(FLAG_randomize_string_hashes || seed == 0); |
+ return seed; |
+ } |
+ |
private: |
Heap(); |