@@ -230,10 +230,6 @@ HEAP_CONSTANT_LIST(HEAP_CONSTANT_ACCESSOR);
230230HEAP_CONSTANT_LIST (HEAP_CONSTANT_TEST);
231231#undef  HEAP_CONSTANT_TEST
232232
233- TNode<Int32T> CodeStubAssembler::HashSeed () {
234-   return  LoadAndUntagToWord32Root (Heap::kHashSeedRootIndex );
235- }
236- 
237233Node* CodeStubAssembler::IntPtrOrSmiConstant (int  value, ParameterMode mode) {
238234  if  (mode == SMI_PARAMETERS) {
239235    return  SmiConstant (value);
@@ -7094,14 +7090,9 @@ template void CodeStubAssembler::NameDictionaryLookup<GlobalDictionary>(
70947090    TNode<GlobalDictionary>, TNode<Name>, Label*, TVariable<IntPtrT>*, Label*,
70957091    int , LookupMode);
70967092
7097- Node* CodeStubAssembler::ComputeIntegerHash (Node* key) {
7098-   return  ComputeIntegerHash (key, IntPtrConstant (kZeroHashSeed ));
7099- }
7100- 
7101- Node* CodeStubAssembler::ComputeIntegerHash (Node* key, Node* seed) {
7102-   //  See v8::internal::ComputeIntegerHash()
7093+ Node* CodeStubAssembler::ComputeUnseededHash (Node* key) {
7094+   //  See v8::internal::ComputeUnseededHash()
71037095  Node* hash = TruncateIntPtrToInt32 (key);
7104-   hash = Word32Xor (hash, seed);
71057096  hash = Int32Add (Word32Xor (hash, Int32Constant (0xFFFFFFFF )),
71067097                  Word32Shl (hash, Int32Constant (15 )));
71077098  hash = Word32Xor (hash, Word32Shr (hash, Int32Constant (12 )));
@@ -7112,6 +7103,21 @@ Node* CodeStubAssembler::ComputeIntegerHash(Node* key, Node* seed) {
71127103  return  Word32And (hash, Int32Constant (0x3FFFFFFF ));
71137104}
71147105
7106+ Node* CodeStubAssembler::ComputeSeededHash (Node* key) {
7107+   Node* const  function_addr =
7108+       ExternalConstant (ExternalReference::compute_integer_hash ());
7109+   Node* const  isolate_ptr =
7110+       ExternalConstant (ExternalReference::isolate_address (isolate ()));
7111+ 
7112+   MachineType type_ptr = MachineType::Pointer ();
7113+   MachineType type_uint32 = MachineType::Uint32 ();
7114+ 
7115+   Node* const  result =
7116+       CallCFunction2 (type_uint32, type_ptr, type_uint32, function_addr,
7117+                      isolate_ptr, TruncateIntPtrToInt32 (key));
7118+   return  result;
7119+ }
7120+ 
71157121void  CodeStubAssembler::NumberDictionaryLookup (
71167122    TNode<NumberDictionary> dictionary, TNode<IntPtrT> intptr_index,
71177123    Label* if_found, TVariable<IntPtrT>* var_entry, Label* if_not_found) {
@@ -7122,9 +7128,7 @@ void CodeStubAssembler::NumberDictionaryLookup(
71227128  TNode<IntPtrT> capacity = SmiUntag (GetCapacity<NumberDictionary>(dictionary));
71237129  TNode<WordT> mask = IntPtrSub (capacity, IntPtrConstant (1 ));
71247130
7125-   TNode<Int32T> int32_seed = HashSeed ();
7126-   TNode<WordT> hash =
7127-       ChangeUint32ToWord (ComputeIntegerHash (intptr_index, int32_seed));
7131+   TNode<WordT> hash = ChangeUint32ToWord (ComputeSeededHash (intptr_index));
71287132  Node* key_as_float64 = RoundIntPtrToFloat64 (intptr_index);
71297133
71307134  //  See Dictionary::FirstProbe().
0 commit comments