| OLD | NEW | 
|   1 // Copyright 2016 the V8 project authors. All rights reserved. |   1 // Copyright 2016 the V8 project authors. All rights reserved. | 
|   2 // Use of this source code is governed by a BSD-style license that can be |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #include "src/lookup.h" |   5 #include "src/lookup-cache.h" | 
 |   6  | 
 |   7 #include "src/objects-inl.h" | 
|   6  |   8  | 
|   7 namespace v8 { |   9 namespace v8 { | 
|   8 namespace internal { |  10 namespace internal { | 
|   9  |  11  | 
|  10 // static |  12 // static | 
|  11 int DescriptorLookupCache::Hash(Object* source, Name* name) { |  13 int DescriptorLookupCache::Hash(Object* source, Name* name) { | 
|  12   DCHECK(name->IsUniqueName()); |  14   DCHECK(name->IsUniqueName()); | 
|  13   // Uses only lower 32 bits if pointers are larger. |  15   // Uses only lower 32 bits if pointers are larger. | 
|  14   uint32_t source_hash = |  16   uint32_t source_hash = | 
|  15       static_cast<uint32_t>(reinterpret_cast<uintptr_t>(source)) >> |  17       static_cast<uint32_t>(reinterpret_cast<uintptr_t>(source)) >> | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
|  29   DCHECK(result != kAbsent); |  31   DCHECK(result != kAbsent); | 
|  30   int index = Hash(source, name); |  32   int index = Hash(source, name); | 
|  31   Key& key = keys_[index]; |  33   Key& key = keys_[index]; | 
|  32   key.source = source; |  34   key.source = source; | 
|  33   key.name = name; |  35   key.name = name; | 
|  34   results_[index] = result; |  36   results_[index] = result; | 
|  35 } |  37 } | 
|  36  |  38  | 
|  37 }  // namespace internal |  39 }  // namespace internal | 
|  38 }  // namespace v8 |  40 }  // namespace v8 | 
| OLD | NEW |