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

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

Issue 2511603002: [ic] Support data handlers in LoadGlobalIC. (Closed)
Patch Set: fix 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
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-inl.h" 8 #include "src/ic/ic-inl.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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 SKIP_WRITE_BARRIER); 706 SKIP_WRITE_BARRIER);
707 } 707 }
708 708
709 void LoadGlobalICNexus::ConfigurePropertyCellMode(Handle<PropertyCell> cell) { 709 void LoadGlobalICNexus::ConfigurePropertyCellMode(Handle<PropertyCell> cell) {
710 Isolate* isolate = GetIsolate(); 710 Isolate* isolate = GetIsolate();
711 SetFeedback(*isolate->factory()->NewWeakCell(cell)); 711 SetFeedback(*isolate->factory()->NewWeakCell(cell));
712 SetFeedbackExtra(*TypeFeedbackVector::UninitializedSentinel(isolate), 712 SetFeedbackExtra(*TypeFeedbackVector::UninitializedSentinel(isolate),
713 SKIP_WRITE_BARRIER); 713 SKIP_WRITE_BARRIER);
714 } 714 }
715 715
716 void LoadGlobalICNexus::ConfigureHandlerMode(Handle<Code> handler) { 716 void LoadGlobalICNexus::ConfigureHandlerMode(Handle<Object> handler) {
717 SetFeedback(GetIsolate()->heap()->empty_weak_cell()); 717 SetFeedback(GetIsolate()->heap()->empty_weak_cell());
718 SetFeedbackExtra(*handler); 718 SetFeedbackExtra(*handler);
719 } 719 }
720 720
721 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name, 721 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name,
722 Handle<Map> receiver_map, 722 Handle<Map> receiver_map,
723 Handle<Object> handler) { 723 Handle<Object> handler) {
724 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); 724 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map);
725 if (name.is_null()) { 725 if (name.is_null()) {
726 SetFeedback(*cell); 726 SetFeedback(*cell);
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 return BinaryOperationHintFromFeedback(feedback); 1071 return BinaryOperationHintFromFeedback(feedback);
1072 } 1072 }
1073 1073
1074 CompareOperationHint CompareICNexus::GetCompareOperationFeedback() const { 1074 CompareOperationHint CompareICNexus::GetCompareOperationFeedback() const {
1075 int feedback = Smi::cast(GetFeedback())->value(); 1075 int feedback = Smi::cast(GetFeedback())->value();
1076 return CompareOperationHintFromFeedback(feedback); 1076 return CompareOperationHintFromFeedback(feedback);
1077 } 1077 }
1078 1078
1079 } // namespace internal 1079 } // namespace internal
1080 } // namespace v8 1080 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698