| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 | 2 |
| 3 #include <stdlib.h> | 3 #include <stdlib.h> |
| 4 | 4 |
| 5 #include "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #include "execution.h" | 7 #include "execution.h" |
| 8 #include "factory.h" | 8 #include "factory.h" |
| 9 #include "macro-assembler.h" | 9 #include "macro-assembler.h" |
| 10 #include "global-handles.h" | 10 #include "global-handles.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 value = Heap::NumberFromInt32(Smi::kMinValue); | 125 value = Heap::NumberFromInt32(Smi::kMinValue); |
| 126 CHECK(value->IsSmi()); | 126 CHECK(value->IsSmi()); |
| 127 CHECK(value->IsNumber()); | 127 CHECK(value->IsNumber()); |
| 128 CHECK_EQ(Smi::kMinValue, Smi::cast(value)->value()); | 128 CHECK_EQ(Smi::kMinValue, Smi::cast(value)->value()); |
| 129 | 129 |
| 130 value = Heap::NumberFromInt32(Smi::kMaxValue); | 130 value = Heap::NumberFromInt32(Smi::kMaxValue); |
| 131 CHECK(value->IsSmi()); | 131 CHECK(value->IsSmi()); |
| 132 CHECK(value->IsNumber()); | 132 CHECK(value->IsNumber()); |
| 133 CHECK_EQ(Smi::kMaxValue, Smi::cast(value)->value()); | 133 CHECK_EQ(Smi::kMaxValue, Smi::cast(value)->value()); |
| 134 | 134 |
| 135 #ifndef V8_LONG_SMI | 135 #ifndef V8_TARGET_ARCH_X64 |
| 136 // TODO(lrn): We need a NumberFromIntptr function in order to test this. | 136 // TODO(lrn): We need a NumberFromIntptr function in order to test this. |
| 137 value = Heap::NumberFromInt32(Smi::kMinValue - 1); | 137 value = Heap::NumberFromInt32(Smi::kMinValue - 1); |
| 138 CHECK(value->IsHeapNumber()); | 138 CHECK(value->IsHeapNumber()); |
| 139 CHECK(value->IsNumber()); | 139 CHECK(value->IsNumber()); |
| 140 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); | 140 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 value = Heap::NumberFromUint32(static_cast<uint32_t>(Smi::kMaxValue) + 1); | 143 value = Heap::NumberFromUint32(static_cast<uint32_t>(Smi::kMaxValue) + 1); |
| 144 CHECK(value->IsHeapNumber()); | 144 CHECK(value->IsHeapNumber()); |
| 145 CHECK(value->IsNumber()); | 145 CHECK(value->IsNumber()); |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 788 objs[next_objs_index++] = | 788 objs[next_objs_index++] = |
| 789 Factory::NewStringFromAscii(CStrVector(str), TENURED); | 789 Factory::NewStringFromAscii(CStrVector(str), TENURED); |
| 790 delete[] str; | 790 delete[] str; |
| 791 | 791 |
| 792 // Add a Map object to look for. | 792 // Add a Map object to look for. |
| 793 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map()); | 793 objs[next_objs_index++] = Handle<Map>(HeapObject::cast(*objs[0])->map()); |
| 794 | 794 |
| 795 CHECK_EQ(objs_count, next_objs_index); | 795 CHECK_EQ(objs_count, next_objs_index); |
| 796 CHECK_EQ(objs_count, ObjectsFoundInHeap(objs, objs_count)); | 796 CHECK_EQ(objs_count, ObjectsFoundInHeap(objs, objs_count)); |
| 797 } | 797 } |
| OLD | NEW |