| Index: src/utils.h
|
| diff --git a/src/utils.h b/src/utils.h
|
| index 5c58ff8e608d03df56ea9b1b082dffc726d95ec8..e2e10fd73d0866f69082cbca6279e58e805b61e0 100644
|
| --- a/src/utils.h
|
| +++ b/src/utils.h
|
| @@ -156,7 +156,7 @@ T Abs(T a) {
|
|
|
| // Floor(-0.0) == 0.0
|
| inline double Floor(double x) {
|
| -#ifdef _MSC_VER
|
| +#if V8_CC_MSVC
|
| if (x == 0) return x; // Fix for issue 3477.
|
| #endif
|
| return std::floor(x);
|
| @@ -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) { }
|
|
|