| Index: src/utils.h
|
| diff --git a/src/utils.h b/src/utils.h
|
| index 5c58ff8e608d03df56ea9b1b082dffc726d95ec8..58bcb3ae746c4955e8b7957ccdc07527a1a57c26 100644
|
| --- a/src/utils.h
|
| +++ b/src/utils.h
|
| @@ -951,21 +951,22 @@ class TypeFeedbackId {
|
| };
|
|
|
|
|
| -class FeedbackVectorSlot {
|
| +template <int dummy_parameter>
|
| +class VectorSlot {
|
| public:
|
| - explicit FeedbackVectorSlot(int id) : id_(id) {}
|
| + explicit VectorSlot(int id) : id_(id) {}
|
| int ToInt() const { return id_; }
|
|
|
| - static FeedbackVectorSlot Invalid() {
|
| - return FeedbackVectorSlot(kInvalidSlot);
|
| - }
|
| + static VectorSlot Invalid() { return VectorSlot(kInvalidSlot); }
|
| bool IsInvalid() const { return id_ == kInvalidSlot; }
|
|
|
| - FeedbackVectorSlot next() const {
|
| + VectorSlot next() const {
|
| DCHECK(id_ != kInvalidSlot);
|
| - return FeedbackVectorSlot(id_ + 1);
|
| + return VectorSlot(id_ + 1);
|
| }
|
|
|
| + bool operator==(const VectorSlot& other) const { return id_ == other.id_; }
|
| +
|
| private:
|
| static const int kInvalidSlot = -1;
|
|
|
| @@ -973,6 +974,10 @@ class FeedbackVectorSlot {
|
| };
|
|
|
|
|
| +typedef VectorSlot<0> FeedbackVectorSlot;
|
| +typedef VectorSlot<1> FeedbackVectorICSlot;
|
| +
|
| +
|
| class BailoutId {
|
| public:
|
| explicit BailoutId(int id) : id_(id) { }
|
|
|