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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 Object* feedback = nexus->vector()->Get(nexus->slot()); | 441 Object* feedback = nexus->vector()->Get(nexus->slot()); |
442 State state = nexus->StateFromFeedback(); | 442 State state = nexus->StateFromFeedback(); |
443 | 443 |
444 if (state != UNINITIALIZED && !feedback->IsAllocationSite()) { | 444 if (state != UNINITIALIZED && !feedback->IsAllocationSite()) { |
445 nexus->ConfigureUninitialized(); | 445 nexus->ConfigureUninitialized(); |
446 // The change in state must be processed. | 446 // The change in state must be processed. |
447 OnTypeFeedbackChanged(isolate, host); | 447 OnTypeFeedbackChanged(isolate, host); |
448 } | 448 } |
449 } | 449 } |
450 | 450 |
| 451 Handle<Code> LoadIC::slow_stub() const { |
| 452 LoadICSlowStub stub(isolate()); |
| 453 return stub.GetCode(); |
| 454 } |
451 | 455 |
452 void LoadIC::Clear(Isolate* isolate, Code* host, LoadICNexus* nexus) { | 456 void LoadIC::Clear(Isolate* isolate, Code* host, LoadICNexus* nexus) { |
453 if (IsCleared(nexus)) return; | 457 if (IsCleared(nexus)) return; |
454 nexus->ConfigurePremonomorphic(); | 458 nexus->ConfigurePremonomorphic(); |
455 OnTypeFeedbackChanged(isolate, host); | 459 OnTypeFeedbackChanged(isolate, host); |
456 } | 460 } |
457 | 461 |
458 | 462 |
459 void StoreIC::Clear(Isolate* isolate, Code* host, StoreICNexus* nexus) { | 463 void StoreIC::Clear(Isolate* isolate, Code* host, StoreICNexus* nexus) { |
460 if (IsCleared(nexus)) return; | 464 if (IsCleared(nexus)) return; |
(...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2937 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, | 2941 DCHECK_EQ(FeedbackVectorSlotKind::KEYED_LOAD_IC, |
2938 vector->GetKind(vector_slot)); | 2942 vector->GetKind(vector_slot)); |
2939 KeyedLoadICNexus nexus(vector, vector_slot); | 2943 KeyedLoadICNexus nexus(vector, vector_slot); |
2940 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); | 2944 KeyedLoadIC ic(IC::EXTRA_CALL_FRAME, isolate, &nexus); |
2941 ic.UpdateState(receiver, key); | 2945 ic.UpdateState(receiver, key); |
2942 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); | 2946 RETURN_RESULT_OR_FAILURE(isolate, ic.Load(receiver, key)); |
2943 } | 2947 } |
2944 } | 2948 } |
2945 } // namespace internal | 2949 } // namespace internal |
2946 } // namespace v8 | 2950 } // namespace v8 |
OLD | NEW |