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.h" | 8 #include "src/api.h" |
9 #include "src/api-arguments.h" | 9 #include "src/api-arguments.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 VectorStoreICStub stub(isolate, StoreICState(language_mode)); | 1429 VectorStoreICStub stub(isolate, StoreICState(language_mode)); |
1430 return stub.GetCode(); | 1430 return stub.GetCode(); |
1431 } | 1431 } |
1432 | 1432 |
1433 return is_strict(language_mode) | 1433 return is_strict(language_mode) |
1434 ? isolate->builtins()->StoreIC_Megamorphic_Strict() | 1434 ? isolate->builtins()->StoreIC_Megamorphic_Strict() |
1435 : isolate->builtins()->StoreIC_Megamorphic(); | 1435 : isolate->builtins()->StoreIC_Megamorphic(); |
1436 } | 1436 } |
1437 | 1437 |
1438 Handle<Code> StoreIC::slow_stub() const { | 1438 Handle<Code> StoreIC::slow_stub() const { |
1439 if (kind() == Code::STORE_IC) { | 1439 return isolate()->builtins()->StoreIC_Slow(); |
1440 return isolate()->builtins()->StoreIC_Slow(); | |
1441 } else { | |
1442 DCHECK(kind() == Code::KEYED_STORE_IC); | |
1443 return isolate()->builtins()->KeyedStoreIC_Slow(); | |
1444 } | |
1445 } | 1440 } |
1446 | 1441 |
1447 | 1442 |
1448 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 1443 void StoreIC::UpdateCaches(LookupIterator* lookup, Handle<Object> value, |
1449 JSReceiver::StoreFromKeyed store_mode) { | 1444 JSReceiver::StoreFromKeyed store_mode) { |
1450 if (state() == UNINITIALIZED) { | 1445 if (state() == UNINITIALIZED) { |
1451 // This is the first time we execute this inline cache. Set the target to | 1446 // This is the first time we execute this inline cache. Set the target to |
1452 // the pre monomorphic stub to delay setting the monomorphic state. | 1447 // the pre monomorphic stub to delay setting the monomorphic state. |
1453 ConfigureVectorState(PREMONOMORPHIC); | 1448 ConfigureVectorState(PREMONOMORPHIC); |
1454 TRACE_IC("StoreIC", lookup->name()); | 1449 TRACE_IC("StoreIC", lookup->name()); |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 KeyedLoadICNexus nexus(vector, vector_slot); | 2733 KeyedLoadICNexus nexus(vector, vector_slot); |
2739 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2734 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2740 ic.UpdateState(receiver, key); | 2735 ic.UpdateState(receiver, key); |
2741 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); | 2736 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, ic.Load(receiver, key)); |
2742 } | 2737 } |
2743 | 2738 |
2744 return *result; | 2739 return *result; |
2745 } | 2740 } |
2746 } // namespace internal | 2741 } // namespace internal |
2747 } // namespace v8 | 2742 } // namespace v8 |
OLD | NEW |