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

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

Issue 2065113002: [ic] LoadGlobalIC caches PropertyCells in the feedback vector. (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/s390/interface-descriptors-s390.cc ('k') | src/type-feedback-vector.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 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 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_ 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_
6 #define V8_TYPE_FEEDBACK_VECTOR_H_ 6 #define V8_TYPE_FEEDBACK_VECTOR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 public: 457 public:
458 LoadGlobalICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) 458 LoadGlobalICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
459 : FeedbackNexus(vector, slot) { 459 : FeedbackNexus(vector, slot) {
460 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot)); 460 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot));
461 } 461 }
462 LoadGlobalICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot) 462 LoadGlobalICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot)
463 : FeedbackNexus(vector, slot) { 463 : FeedbackNexus(vector, slot) {
464 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot)); 464 DCHECK_EQ(FeedbackVectorSlotKind::LOAD_GLOBAL_IC, vector->GetKind(slot));
465 } 465 }
466 466
467 int ExtractMaps(MapHandleList* maps) const final {
468 // LoadGlobalICs don't record map feedback.
469 return 0;
470 }
471 MaybeHandle<Code> FindHandlerForMap(Handle<Map> map) const final {
472 return MaybeHandle<Code>();
473 }
474 bool FindHandlers(CodeHandleList* code_list, int length = -1) const final {
475 return length == 0;
476 }
477
467 void ConfigureMegamorphic() override { UNREACHABLE(); } 478 void ConfigureMegamorphic() override { UNREACHABLE(); }
468 void Clear(Code* host); 479 void Clear(Code* host);
469 480
481 // TODO(ishell): remove LoadIC-style mode support.
470 void ConfigureMonomorphic(Handle<Map> receiver_map, Handle<Code> handler); 482 void ConfigureMonomorphic(Handle<Map> receiver_map, Handle<Code> handler);
471 483
484 // PropertyCell shortcut mode.
485 void ConfigureUninitialized() override;
486 void ConfigurePropertyCellMode(Handle<PropertyCell> cell);
487 void ConfigureHandlerMode(Handle<Code> handler);
488
472 InlineCacheState StateFromFeedback() const override; 489 InlineCacheState StateFromFeedback() const override;
473 }; 490 };
474 491
475 class KeyedLoadICNexus : public FeedbackNexus { 492 class KeyedLoadICNexus : public FeedbackNexus {
476 public: 493 public:
477 KeyedLoadICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) 494 KeyedLoadICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot)
478 : FeedbackNexus(vector, slot) { 495 : FeedbackNexus(vector, slot) {
479 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, vector->GetKind(slot)); 496 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, vector->GetKind(slot));
480 } 497 }
481 KeyedLoadICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot) 498 KeyedLoadICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; 573 KeyedAccessStoreMode GetKeyedAccessStoreMode() const;
557 IcCheckType GetKeyType() const; 574 IcCheckType GetKeyType() const;
558 575
559 InlineCacheState StateFromFeedback() const override; 576 InlineCacheState StateFromFeedback() const override;
560 Name* FindFirstName() const override; 577 Name* FindFirstName() const override;
561 }; 578 };
562 } // namespace internal 579 } // namespace internal
563 } // namespace v8 580 } // namespace v8
564 581
565 #endif // V8_TRANSITIONS_H_ 582 #endif // V8_TRANSITIONS_H_
OLDNEW
« no previous file with comments | « src/s390/interface-descriptors-s390.cc ('k') | src/type-feedback-vector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698