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

Side by Side Diff: src/type-feedback-vector.cc

Issue 1314433004: Vector ICs: Stop iterating the heap to clear keyed store ics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« src/heap/heap.cc ('K') | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/type-feedback-vector.h" 5 #include "src/type-feedback-vector.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-state.h" 9 #include "src/ic/ic-state.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 } else if (kind == Code::KEYED_STORE_IC) { 216 } else if (kind == Code::KEYED_STORE_IC) {
217 DCHECK(FLAG_vector_stores); 217 DCHECK(FLAG_vector_stores);
218 KeyedStoreICNexus nexus(this, slot); 218 KeyedStoreICNexus nexus(this, slot);
219 nexus.Clear(host); 219 nexus.Clear(host);
220 } 220 }
221 } 221 }
222 } 222 }
223 } 223 }
224 224
225 225
226 void TypeFeedbackVector::ClearKeyedStoreICs(SharedFunctionInfo* shared) {
227 Heap* heap = GetIsolate()->heap();
228
229 int slots = ICSlots();
230 Code* host = shared->code();
231 Object* uninitialized_sentinel =
232 TypeFeedbackVector::RawUninitializedSentinel(heap);
233 for (int i = 0; i < slots; i++) {
234 FeedbackVectorICSlot slot(i);
235 Object* obj = Get(slot);
236 if (obj != uninitialized_sentinel) {
237 Code::Kind kind = GetKind(slot);
238 if (kind == Code::KEYED_STORE_IC) {
239 DCHECK(FLAG_vector_stores);
240 KeyedStoreICNexus nexus(this, slot);
241 nexus.Clear(host);
242 }
243 }
244 }
245 }
246
247
226 // static 248 // static
227 Handle<TypeFeedbackVector> TypeFeedbackVector::DummyVector(Isolate* isolate) { 249 Handle<TypeFeedbackVector> TypeFeedbackVector::DummyVector(Isolate* isolate) {
228 return Handle<TypeFeedbackVector>::cast(isolate->factory()->dummy_vector()); 250 return Handle<TypeFeedbackVector>::cast(isolate->factory()->dummy_vector());
229 } 251 }
230 252
231 253
232 Handle<FixedArray> FeedbackNexus::EnsureArrayOfSize(int length) { 254 Handle<FixedArray> FeedbackNexus::EnsureArrayOfSize(int length) {
233 Isolate* isolate = GetIsolate(); 255 Isolate* isolate = GetIsolate();
234 Handle<Object> feedback = handle(GetFeedback(), isolate); 256 Handle<Object> feedback = handle(GetFeedback(), isolate);
235 if (!feedback->IsFixedArray() || 257 if (!feedback->IsFixedArray() ||
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 void StoreICNexus::Clear(Code* host) { 705 void StoreICNexus::Clear(Code* host) {
684 StoreIC::Clear(GetIsolate(), host, this); 706 StoreIC::Clear(GetIsolate(), host, this);
685 } 707 }
686 708
687 709
688 void KeyedStoreICNexus::Clear(Code* host) { 710 void KeyedStoreICNexus::Clear(Code* host) {
689 KeyedStoreIC::Clear(GetIsolate(), host, this); 711 KeyedStoreIC::Clear(GetIsolate(), host, this);
690 } 712 }
691 } // namespace internal 713 } // namespace internal
692 } // namespace v8 714 } // namespace v8
OLDNEW
« src/heap/heap.cc ('K') | « src/type-feedback-vector.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698