OLD | NEW |
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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 SetFeedback(*cell); | 726 SetFeedback(*cell); |
727 SetFeedbackExtra(*handler); | 727 SetFeedbackExtra(*handler); |
728 } else { | 728 } else { |
729 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); | 729 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); |
730 SetFeedback(*name); | 730 SetFeedback(*name); |
731 array->set(0, *cell); | 731 array->set(0, *cell); |
732 array->set(1, *handler); | 732 array->set(1, *handler); |
733 } | 733 } |
734 } | 734 } |
735 | 735 |
736 | |
737 void StoreICNexus::ConfigureMonomorphic(Handle<Map> receiver_map, | 736 void StoreICNexus::ConfigureMonomorphic(Handle<Map> receiver_map, |
738 Handle<Code> handler) { | 737 Handle<Object> handler) { |
739 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); | 738 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
740 SetFeedback(*cell); | 739 SetFeedback(*cell); |
741 SetFeedbackExtra(*handler); | 740 SetFeedbackExtra(*handler); |
742 } | 741 } |
743 | 742 |
744 | |
745 void KeyedStoreICNexus::ConfigureMonomorphic(Handle<Name> name, | 743 void KeyedStoreICNexus::ConfigureMonomorphic(Handle<Name> name, |
746 Handle<Map> receiver_map, | 744 Handle<Map> receiver_map, |
747 Handle<Code> handler) { | 745 Handle<Object> handler) { |
748 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); | 746 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
749 if (name.is_null()) { | 747 if (name.is_null()) { |
750 SetFeedback(*cell); | 748 SetFeedback(*cell); |
751 SetFeedbackExtra(*handler); | 749 SetFeedbackExtra(*handler); |
752 } else { | 750 } else { |
753 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); | 751 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); |
754 SetFeedback(*name); | 752 SetFeedback(*name); |
755 array->set(0, *cell); | 753 array->set(0, *cell); |
756 array->set(1, *handler); | 754 array->set(1, *handler); |
757 } | 755 } |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 return BinaryOperationHintFromFeedback(feedback); | 1071 return BinaryOperationHintFromFeedback(feedback); |
1074 } | 1072 } |
1075 | 1073 |
1076 CompareOperationHint CompareICNexus::GetCompareOperationFeedback() const { | 1074 CompareOperationHint CompareICNexus::GetCompareOperationFeedback() const { |
1077 int feedback = Smi::cast(GetFeedback())->value(); | 1075 int feedback = Smi::cast(GetFeedback())->value(); |
1078 return CompareOperationHintFromFeedback(feedback); | 1076 return CompareOperationHintFromFeedback(feedback); |
1079 } | 1077 } |
1080 | 1078 |
1081 } // namespace internal | 1079 } // namespace internal |
1082 } // namespace v8 | 1080 } // namespace v8 |
OLD | NEW |