| 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 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_ | 5 #ifndef V8_TYPE_FEEDBACK_VECTOR_H_ |
| 6 #define V8_TYPE_FEEDBACK_VECTOR_H_ | 6 #define V8_TYPE_FEEDBACK_VECTOR_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 // you have a handle to the vector that is better because more operations can | 390 // you have a handle to the vector that is better because more operations can |
| 391 // be done, like allocation. | 391 // be done, like allocation. |
| 392 Handle<TypeFeedbackVector> vector_handle_; | 392 Handle<TypeFeedbackVector> vector_handle_; |
| 393 TypeFeedbackVector* vector_; | 393 TypeFeedbackVector* vector_; |
| 394 FeedbackVectorSlot slot_; | 394 FeedbackVectorSlot slot_; |
| 395 }; | 395 }; |
| 396 | 396 |
| 397 | 397 |
| 398 class CallICNexus final : public FeedbackNexus { | 398 class CallICNexus final : public FeedbackNexus { |
| 399 public: | 399 public: |
| 400 // Monomorphic call ics store call counts. Platform code needs to increment | |
| 401 // the count appropriately (ie, by 2). | |
| 402 static const int kCallCountIncrement = 2; | |
| 403 | |
| 404 CallICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) | 400 CallICNexus(Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 405 : FeedbackNexus(vector, slot) { | 401 : FeedbackNexus(vector, slot) { |
| 406 DCHECK_EQ(FeedbackVectorSlotKind::CALL_IC, vector->GetKind(slot)); | 402 DCHECK_EQ(FeedbackVectorSlotKind::CALL_IC, vector->GetKind(slot)); |
| 407 } | 403 } |
| 408 CallICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot) | 404 CallICNexus(TypeFeedbackVector* vector, FeedbackVectorSlot slot) |
| 409 : FeedbackNexus(vector, slot) { | 405 : FeedbackNexus(vector, slot) { |
| 410 DCHECK_EQ(FeedbackVectorSlotKind::CALL_IC, vector->GetKind(slot)); | 406 DCHECK_EQ(FeedbackVectorSlotKind::CALL_IC, vector->GetKind(slot)); |
| 411 } | 407 } |
| 412 | 408 |
| 413 void Clear(Code* host); | 409 void Clear(Code* host); |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; | 539 KeyedAccessStoreMode GetKeyedAccessStoreMode() const; |
| 544 IcCheckType GetKeyType() const; | 540 IcCheckType GetKeyType() const; |
| 545 | 541 |
| 546 InlineCacheState StateFromFeedback() const override; | 542 InlineCacheState StateFromFeedback() const override; |
| 547 Name* FindFirstName() const override; | 543 Name* FindFirstName() const override; |
| 548 }; | 544 }; |
| 549 } // namespace internal | 545 } // namespace internal |
| 550 } // namespace v8 | 546 } // namespace v8 |
| 551 | 547 |
| 552 #endif // V8_TRANSITIONS_H_ | 548 #endif // V8_TRANSITIONS_H_ |
| OLD | NEW |