| 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.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 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 SKIP_WRITE_BARRIER); | 681 SKIP_WRITE_BARRIER); |
| 682 } | 682 } |
| 683 | 683 |
| 684 void LoadGlobalICNexus::ConfigureHandlerMode(Handle<Code> handler) { | 684 void LoadGlobalICNexus::ConfigureHandlerMode(Handle<Code> handler) { |
| 685 SetFeedback(GetIsolate()->heap()->empty_weak_cell()); | 685 SetFeedback(GetIsolate()->heap()->empty_weak_cell()); |
| 686 SetFeedbackExtra(*handler); | 686 SetFeedbackExtra(*handler); |
| 687 } | 687 } |
| 688 | 688 |
| 689 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name, | 689 void KeyedLoadICNexus::ConfigureMonomorphic(Handle<Name> name, |
| 690 Handle<Map> receiver_map, | 690 Handle<Map> receiver_map, |
| 691 Handle<Code> handler) { | 691 Handle<Object> handler) { |
| 692 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); | 692 Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
| 693 if (name.is_null()) { | 693 if (name.is_null()) { |
| 694 SetFeedback(*cell); | 694 SetFeedback(*cell); |
| 695 SetFeedbackExtra(*handler); | 695 SetFeedbackExtra(*handler); |
| 696 } else { | 696 } else { |
| 697 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); | 697 Handle<FixedArray> array = EnsureExtraArrayOfSize(2); |
| 698 SetFeedback(*name); | 698 SetFeedback(*name); |
| 699 array->set(0, *cell); | 699 array->set(0, *cell); |
| 700 array->set(1, *handler); | 700 array->set(1, *handler); |
| 701 } | 701 } |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1015 | 1015 |
| 1016 IcCheckType KeyedStoreICNexus::GetKeyType() const { | 1016 IcCheckType KeyedStoreICNexus::GetKeyType() const { |
| 1017 Object* feedback = GetFeedback(); | 1017 Object* feedback = GetFeedback(); |
| 1018 if (feedback == *TypeFeedbackVector::MegamorphicSentinel(GetIsolate())) { | 1018 if (feedback == *TypeFeedbackVector::MegamorphicSentinel(GetIsolate())) { |
| 1019 return static_cast<IcCheckType>(Smi::cast(GetFeedbackExtra())->value()); | 1019 return static_cast<IcCheckType>(Smi::cast(GetFeedbackExtra())->value()); |
| 1020 } | 1020 } |
| 1021 return IsPropertyNameFeedback(feedback) ? PROPERTY : ELEMENT; | 1021 return IsPropertyNameFeedback(feedback) ? PROPERTY : ELEMENT; |
| 1022 } | 1022 } |
| 1023 } // namespace internal | 1023 } // namespace internal |
| 1024 } // namespace v8 | 1024 } // namespace v8 |
| OLD | NEW |