| Index: src/type-info.h
|
| ===================================================================
|
| --- src/type-info.h (revision 6575)
|
| +++ src/type-info.h (working copy)
|
| @@ -120,9 +120,9 @@
|
| }
|
|
|
|
|
| - // Integer32 is an integer that can be represented as either a signed
|
| - // 32-bit integer or as an unsigned 32-bit integer. It has to be
|
| - // in the range [-2^31, 2^32 - 1]. We also have to check for negative 0
|
| + // 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.
|
| static inline bool IsInt32Double(double value) {
|
| const DoubleRepresentation minus_zero(-0.0);
|
| @@ -135,6 +135,19 @@
|
| return false;
|
| }
|
|
|
| + static inline bool IsSmiDouble(double value) {
|
| + const DoubleRepresentation minus_zero(-0.0);
|
| + DoubleRepresentation rep(value);
|
| + if (rep.bits == minus_zero.bits) return false;
|
| + if (value >= Smi::kMinValue && value <= Smi::kMaxValue &&
|
| + value == static_cast<int32_t>(value)) {
|
| + return true;
|
| + }
|
| + return false;
|
| + }
|
| +
|
| +
|
| +
|
| static TypeInfo TypeFromValue(Handle<Object> value);
|
|
|
| bool Equals(const TypeInfo& other) {
|
|
|