Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Side by Side Diff: src/lookup-cache-inl.h

Issue 2316503004: KeyedLookupCache and DescriptorLookupCache -> lookup-cache{-inl.h,.cc,.h} (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/lookup-cache.cc ('k') | src/lookup-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/lookup-cache.cc ('k') | src/lookup-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698