Index: src/utils.h |
diff --git a/src/utils.h b/src/utils.h |
index bfafe3367a6aeb47a06ab624d7187899c37791c8..5c58ff8e608d03df56ea9b1b082dffc726d95ec8 100644 |
--- a/src/utils.h |
+++ b/src/utils.h |
@@ -951,6 +951,28 @@ class TypeFeedbackId { |
}; |
+class FeedbackVectorSlot { |
+ public: |
+ explicit FeedbackVectorSlot(int id) : id_(id) {} |
+ int ToInt() const { return id_; } |
+ |
+ static FeedbackVectorSlot Invalid() { |
+ return FeedbackVectorSlot(kInvalidSlot); |
+ } |
+ bool IsInvalid() const { return id_ == kInvalidSlot; } |
+ |
+ FeedbackVectorSlot next() const { |
+ DCHECK(id_ != kInvalidSlot); |
+ return FeedbackVectorSlot(id_ + 1); |
+ } |
+ |
+ private: |
+ static const int kInvalidSlot = -1; |
+ |
+ int id_; |
+}; |
+ |
+ |
class BailoutId { |
public: |
explicit BailoutId(int id) : id_(id) { } |