| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/ic/ic.h" | 5 #include "src/ic/ic.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-arguments-inl.h" | 8 #include "src/api-arguments-inl.h" |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 | 830 |
| 831 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code( | 831 Handle<Code> KeyedLoadIC::initialize_stub_in_optimized_code( |
| 832 Isolate* isolate, ExtraICState extra_state) { | 832 Isolate* isolate, ExtraICState extra_state) { |
| 833 // TODO(ishell): remove extra_ic_state | 833 // TODO(ishell): remove extra_ic_state |
| 834 return KeyedLoadICStub(isolate).GetCode(); | 834 return KeyedLoadICStub(isolate).GetCode(); |
| 835 } | 835 } |
| 836 | 836 |
| 837 Handle<Code> KeyedStoreIC::initialize_stub_in_optimized_code( | 837 Handle<Code> KeyedStoreIC::initialize_stub_in_optimized_code( |
| 838 Isolate* isolate, LanguageMode language_mode) { | 838 Isolate* isolate, LanguageMode language_mode) { |
| 839 StoreICState state = StoreICState(language_mode); | 839 StoreICState state = StoreICState(language_mode); |
| 840 return VectorKeyedStoreICStub(isolate, state).GetCode(); | 840 return KeyedStoreICStub(isolate, state).GetCode(); |
| 841 } | 841 } |
| 842 | 842 |
| 843 | 843 |
| 844 Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate, | 844 Handle<Code> KeyedStoreIC::ChooseMegamorphicStub(Isolate* isolate, |
| 845 ExtraICState extra_state) { | 845 ExtraICState extra_state) { |
| 846 LanguageMode mode = StoreICState::GetLanguageMode(extra_state); | 846 LanguageMode mode = StoreICState::GetLanguageMode(extra_state); |
| 847 return is_strict(mode) | 847 return is_strict(mode) |
| 848 ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict() | 848 ? isolate->builtins()->KeyedStoreIC_Megamorphic_Strict() |
| 849 : isolate->builtins()->KeyedStoreIC_Megamorphic(); | 849 : isolate->builtins()->KeyedStoreIC_Megamorphic(); |
| 850 } | 850 } |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 Handle<Code> CallIC::initialize_stub_in_optimized_code( | 1581 Handle<Code> CallIC::initialize_stub_in_optimized_code( |
| 1582 Isolate* isolate, int argc, ConvertReceiverMode mode, | 1582 Isolate* isolate, int argc, ConvertReceiverMode mode, |
| 1583 TailCallMode tail_call_mode) { | 1583 TailCallMode tail_call_mode) { |
| 1584 CallICStub stub(isolate, CallICState(argc, mode, tail_call_mode)); | 1584 CallICStub stub(isolate, CallICState(argc, mode, tail_call_mode)); |
| 1585 Handle<Code> code = stub.GetCode(); | 1585 Handle<Code> code = stub.GetCode(); |
| 1586 return code; | 1586 return code; |
| 1587 } | 1587 } |
| 1588 | 1588 |
| 1589 Handle<Code> StoreIC::initialize_stub_in_optimized_code( | 1589 Handle<Code> StoreIC::initialize_stub_in_optimized_code( |
| 1590 Isolate* isolate, LanguageMode language_mode) { | 1590 Isolate* isolate, LanguageMode language_mode) { |
| 1591 VectorStoreICStub stub(isolate, StoreICState(language_mode)); | 1591 StoreICStub stub(isolate, StoreICState(language_mode)); |
| 1592 return stub.GetCode(); | 1592 return stub.GetCode(); |
| 1593 } | 1593 } |
| 1594 | 1594 |
| 1595 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 1595 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, |
| 1596 JSReceiver::StoreFromKeyed store_mode) { | 1596 JSReceiver::StoreFromKeyed store_mode) { |
| 1597 if (state() == UNINITIALIZED) { | 1597 if (state() == UNINITIALIZED) { |
| 1598 // This is the first time we execute this inline cache. Set the target to | 1598 // This is the first time we execute this inline cache. Set the target to |
| 1599 // the pre monomorphic stub to delay setting the monomorphic state. | 1599 // the pre monomorphic stub to delay setting the monomorphic state. |
| 1600 ConfigureVectorState(PREMONOMORPHIC, Handle<Object>()); | 1600 ConfigureVectorState(PREMONOMORPHIC, Handle<Object>()); |
| 1601 TRACE_IC("StoreIC", lookup->name()); | 1601 TRACE_IC("StoreIC", lookup->name()); |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2993 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, | 2993 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, |
| 2994 vector->GetKind(vector_slot)); | 2994 vector->GetKind(vector_slot)); |
| 2995 KeyedLoadICNexus nexus(vector, vector_slot); | 2995 KeyedLoadICNexus nexus(vector, vector_slot); |
| 2996 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2996 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
| 2997 ic.UpdateState(receiver, key); | 2997 ic.UpdateState(receiver, key); |
| 2998 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 2998 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); |
| 2999 } | 2999 } |
| 3000 } | 3000 } |
| 3001 } // namespace internal | 3001 } // namespace internal |
| 3002 } // namespace v8 | 3002 } // namespace v8 |
| OLD | NEW |