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

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

Issue 2123983004: [ic] Split megamorphic stub cache in two caches (for loads and for stores). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@flags-fix
Patch Set: Rebasing Created 4 years, 5 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
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 {
11 namespace internal { 11 namespace internal {
12 12
13 13 StubCache::StubCache(Isolate* isolate, Code::Kind ic_kind)
14 StubCache::StubCache(Isolate* isolate) : isolate_(isolate) {} 14 : isolate_(isolate), ic_kind_(ic_kind) {}
15
16 15
17 void StubCache::Initialize() { 16 void StubCache::Initialize() {
18 DCHECK(base::bits::IsPowerOfTwo32(kPrimaryTableSize)); 17 DCHECK(base::bits::IsPowerOfTwo32(kPrimaryTableSize));
19 DCHECK(base::bits::IsPowerOfTwo32(kSecondaryTableSize)); 18 DCHECK(base::bits::IsPowerOfTwo32(kSecondaryTableSize));
20 Clear(); 19 Clear();
21 } 20 }
22 21
23 22
24 static Code::Flags CommonStubCacheChecks(Name* name, Map* map, 23 static Code::Flags CommonStubCacheChecks(Name* name, Map* map,
25 Code::Flags flags) { 24 Code::Flags flags) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 int offset = SecondaryOffset(*name, flags, primary_offset); 135 int offset = SecondaryOffset(*name, flags, primary_offset);
137 if (entry(secondary_, offset) == &secondary_[i] && 136 if (entry(secondary_, offset) == &secondary_[i] &&
138 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) { 137 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) {
139 types->AddMapIfMissing(Handle<Map>(map), zone); 138 types->AddMapIfMissing(Handle<Map>(map), zone);
140 } 139 }
141 } 140 }
142 } 141 }
143 } 142 }
144 } // namespace internal 143 } // namespace internal
145 } // namespace v8 144 } // namespace v8
OLDNEW
« no previous file with comments | « src/ic/stub-cache.h ('k') | src/ic/x64/ic-x64.cc » ('j') | src/ic/x64/stub-cache-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698