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

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

Issue 2449463002: [ic] Load IC data handlers now support prototype chain checks with global and dictionary objects. (Closed)
Patch Set: Addressing comments and fixing the handlers in new space issue Created 4 years, 1 month 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/s390/handler-compiler-s390.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('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/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/ic/ic-inl.h" 9 #include "src/ic/ic-inl.h"
10 #include "src/type-info.h" 10 #include "src/type-info.h"
(...skipping 12 matching lines...) Expand all
23 DCHECK(base::bits::IsPowerOfTwo32(kPrimaryTableSize)); 23 DCHECK(base::bits::IsPowerOfTwo32(kPrimaryTableSize));
24 DCHECK(base::bits::IsPowerOfTwo32(kSecondaryTableSize)); 24 DCHECK(base::bits::IsPowerOfTwo32(kSecondaryTableSize));
25 Clear(); 25 Clear();
26 } 26 }
27 27
28 #ifdef DEBUG 28 #ifdef DEBUG
29 namespace { 29 namespace {
30 30
31 bool CommonStubCacheChecks(StubCache* stub_cache, Name* name, Map* map, 31 bool CommonStubCacheChecks(StubCache* stub_cache, Name* name, Map* map,
32 Object* handler) { 32 Object* handler) {
33 // Validate that the name does not move on scavenge, and that we 33 // Validate that the name and handler do not move on scavenge, and that we
34 // can use identity checks instead of structural equality checks. 34 // can use identity checks instead of structural equality checks.
35 DCHECK(!name->GetHeap()->InNewSpace(name)); 35 DCHECK(!name->GetHeap()->InNewSpace(name));
36 DCHECK(!name->GetHeap()->InNewSpace(handler));
36 DCHECK(name->IsUniqueName()); 37 DCHECK(name->IsUniqueName());
37 DCHECK(name->HasHashCode()); 38 DCHECK(name->HasHashCode());
38 if (handler) { 39 if (handler) {
39 DCHECK(IC::IsHandler(handler)); 40 DCHECK(IC::IsHandler(handler));
40 if (handler->IsCode()) { 41 if (handler->IsCode()) {
41 Code* code = Code::cast(handler); 42 Code* code = Code::cast(handler);
42 Code::Flags expected_flags = Code::RemoveHolderFromFlags( 43 Code::Flags expected_flags = Code::RemoveHolderFromFlags(
43 Code::ComputeHandlerFlags(stub_cache->ic_kind())); 44 Code::ComputeHandlerFlags(stub_cache->ic_kind()));
44 Code::Flags flags = Code::RemoveHolderFromFlags(code->flags()); 45 Code::Flags flags = Code::RemoveHolderFromFlags(code->flags());
45 DCHECK_EQ(expected_flags, flags); 46 DCHECK_EQ(expected_flags, flags);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 int offset = SecondaryOffset(*name, primary_offset); 142 int offset = SecondaryOffset(*name, primary_offset);
142 if (entry(secondary_, offset) == &secondary_[i] && 143 if (entry(secondary_, offset) == &secondary_[i] &&
143 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) { 144 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) {
144 types->AddMapIfMissing(Handle<Map>(map), zone); 145 types->AddMapIfMissing(Handle<Map>(map), zone);
145 } 146 }
146 } 147 }
147 } 148 }
148 } 149 }
149 } // namespace internal 150 } // namespace internal
150 } // namespace v8 151 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/s390/handler-compiler-s390.cc ('k') | src/ic/x64/handler-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698