| Index: src/conversions.h
|
| diff --git a/src/conversions.h b/src/conversions.h
|
| index c33de77cd1f45f83f3197557a03aaab6f7f84a40..1b76ac5b67606310acea32ccfb6120d58416b469 100644
|
| --- a/src/conversions.h
|
| +++ b/src/conversions.h
|
| @@ -153,6 +153,12 @@ static inline bool IsMinusZero(double value) {
|
| }
|
|
|
|
|
| +static inline bool IsSmiDouble(double value) {
|
| + return !IsMinusZero(value) && value >= Smi::kMinValue &&
|
| + value <= Smi::kMaxValue && value == FastI2D(FastD2I(value));
|
| +}
|
| +
|
| +
|
| // Integer32 is an integer that can be represented as a signed 32-bit
|
| // integer. It has to be in the range [-2^31, 2^31 - 1].
|
| // We also have to check for negative 0 as it is not an Integer32.
|
|
|