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

Side by Side Diff: src/ic/stub-cache.cc

Issue 2052763003: [ic] [stubs] Remove InlineCacheState field from the code flags. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 years, 6 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/ic/ic.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/ic/stub-cache.h" 5 #include "src/ic/stub-cache.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/type-info.h" 8 #include "src/type-info.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 16 matching lines...) Expand all
27 27
28 // Validate that the name does not move on scavenge, and that we 28 // Validate that the name does not move on scavenge, and that we
29 // can use identity checks instead of structural equality checks. 29 // can use identity checks instead of structural equality checks.
30 DCHECK(!name->GetHeap()->InNewSpace(name)); 30 DCHECK(!name->GetHeap()->InNewSpace(name));
31 DCHECK(name->IsUniqueName()); 31 DCHECK(name->IsUniqueName());
32 32
33 // The state bits are not important to the hash function because the stub 33 // The state bits are not important to the hash function because the stub
34 // cache only contains handlers. Make sure that the bits are the least 34 // cache only contains handlers. Make sure that the bits are the least
35 // significant so they will be the ones masked out. 35 // significant so they will be the ones masked out.
36 DCHECK_EQ(Code::HANDLER, Code::ExtractKindFromFlags(flags)); 36 DCHECK_EQ(Code::HANDLER, Code::ExtractKindFromFlags(flags));
37 STATIC_ASSERT((Code::ICStateField::kMask & 1) == 1);
38 37
39 // Make sure that the cache holder are not included in the hash. 38 // Make sure that the cache holder are not included in the hash.
40 DCHECK(Code::ExtractCacheHolderFromFlags(flags) == 0); 39 DCHECK(Code::ExtractCacheHolderFromFlags(flags) == 0);
41 40
42 return flags; 41 return flags;
43 } 42 }
44 43
45 44
46 Code* StubCache::Set(Name* name, Map* map, Code* code) { 45 Code* StubCache::Set(Name* name, Map* map, Code* code) {
47 Code::Flags flags = CommonStubCacheChecks(name, map, code->flags()); 46 Code::Flags flags = CommonStubCacheChecks(name, map, code->flags());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 int offset = SecondaryOffset(*name, flags, primary_offset); 136 int offset = SecondaryOffset(*name, flags, primary_offset);
138 if (entry(secondary_, offset) == &secondary_[i] && 137 if (entry(secondary_, offset) == &secondary_[i] &&
139 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) { 138 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) {
140 types->AddMapIfMissing(Handle<Map>(map), zone); 139 types->AddMapIfMissing(Handle<Map>(map), zone);
141 } 140 }
142 } 141 }
143 } 142 }
144 } 143 }
145 } // namespace internal 144 } // namespace internal
146 } // namespace v8 145 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698