Chromium Code Reviews| Index: src/heap.cc |
| =================================================================== |
| --- src/heap.cc (revision 10379) |
| +++ src/heap.cc (working copy) |
| @@ -2181,17 +2181,17 @@ |
| // Allocate the code_stubs dictionary. The initial size is set to avoid |
| // expanding the dictionary during bootstrapping. |
| - { MaybeObject* maybe_obj = NumberDictionary::Allocate(128); |
| + { MaybeObject* maybe_obj = UnseededNumberDictionary::Allocate(128); |
| if (!maybe_obj->ToObject(&obj)) return false; |
| } |
| - set_code_stubs(NumberDictionary::cast(obj)); |
| + set_code_stubs(UnseededNumberDictionary::cast(obj)); |
| // Allocate the non_monomorphic_cache used in stub-cache.cc. The initial size |
| // is set to avoid expanding the dictionary during bootstrapping. |
| - { MaybeObject* maybe_obj = NumberDictionary::Allocate(64); |
| + { MaybeObject* maybe_obj = UnseededNumberDictionary::Allocate(64); |
| if (!maybe_obj->ToObject(&obj)) return false; |
| } |
| - set_non_monomorphic_cache(NumberDictionary::cast(obj)); |
| + set_non_monomorphic_cache(UnseededNumberDictionary::cast(obj)); |
| { MaybeObject* maybe_obj = AllocatePolymorphicCodeCache(); |
| if (!maybe_obj->ToObject(&obj)) return false; |
| @@ -5362,14 +5362,14 @@ |
| if (lo_space_ == NULL) return false; |
| if (!lo_space_->Setup()) return false; |
| - // Set up the seed that is used to randomize the string hash function. |
| - ASSERT(string_hash_seed() == 0); |
| - if (FLAG_randomize_string_hashes) { |
| - if (FLAG_string_hash_seed == 0) { |
| - set_string_hash_seed( |
| + // Setup the seed that is used to randomize the string hash function. |
|
Erik Corry
2012/01/19 15:35:00
AAAAArhg! :-)
|
| + ASSERT(hash_seed() == 0); |
| + if (FLAG_randomize_hashes) { |
| + if (FLAG_hash_seed == 0) { |
| + set_hash_seed( |
| Smi::FromInt(V8::RandomPrivate(isolate()) & 0x3fffffff)); |
| } else { |
| - set_string_hash_seed(Smi::FromInt(FLAG_string_hash_seed)); |
| + set_hash_seed(Smi::FromInt(FLAG_hash_seed)); |
| } |
| } |