| Index: src/type-info.cc
|
| ===================================================================
|
| --- src/type-info.cc (revision 6575)
|
| +++ src/type-info.cc (working copy)
|
| @@ -46,9 +46,14 @@
|
| if (value->IsSmi()) {
|
| info = TypeInfo::Smi();
|
| } else if (value->IsHeapNumber()) {
|
| - info = TypeInfo::IsInt32Double(HeapNumber::cast(*value)->value())
|
| - ? TypeInfo::Integer32()
|
| - : TypeInfo::Double();
|
| + double double_value = HeapNumber::cast(*value)->value();
|
| + if (TypeInfo::IsSmiDouble(double_value)) {
|
| + info = TypeInfo::Smi();
|
| + } else if (TypeInfo::IsInt32Double(double_value)) {
|
| + info = TypeInfo::Integer32();
|
| + } else {
|
| + info = TypeInfo::Double();
|
| + }
|
| } else if (value->IsString()) {
|
| info = TypeInfo::String();
|
| } else {
|
|
|