| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 value = factory->NewNumberFromInt(Smi::kMinValue); | 172 value = factory->NewNumberFromInt(Smi::kMinValue); |
| 173 CHECK(value->IsSmi()); | 173 CHECK(value->IsSmi()); |
| 174 CHECK(value->IsNumber()); | 174 CHECK(value->IsNumber()); |
| 175 CHECK_EQ(Smi::kMinValue, Handle<Smi>::cast(value)->value()); | 175 CHECK_EQ(Smi::kMinValue, Handle<Smi>::cast(value)->value()); |
| 176 | 176 |
| 177 value = factory->NewNumberFromInt(Smi::kMaxValue); | 177 value = factory->NewNumberFromInt(Smi::kMaxValue); |
| 178 CHECK(value->IsSmi()); | 178 CHECK(value->IsSmi()); |
| 179 CHECK(value->IsNumber()); | 179 CHECK(value->IsNumber()); |
| 180 CHECK_EQ(Smi::kMaxValue, Handle<Smi>::cast(value)->value()); | 180 CHECK_EQ(Smi::kMaxValue, Handle<Smi>::cast(value)->value()); |
| 181 | 181 |
| 182 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_ARM64) | 182 #if !defined(V8_TARGET_ARCH_X64) && !defined(V8_TARGET_ARCH_ARM64) && \ |
| 183 !defined(V8_TARGET_ARCH_MIPS64) |
| 183 // TODO(lrn): We need a NumberFromIntptr function in order to test this. | 184 // TODO(lrn): We need a NumberFromIntptr function in order to test this. |
| 184 value = factory->NewNumberFromInt(Smi::kMinValue - 1); | 185 value = factory->NewNumberFromInt(Smi::kMinValue - 1); |
| 185 CHECK(value->IsHeapNumber()); | 186 CHECK(value->IsHeapNumber()); |
| 186 CHECK(value->IsNumber()); | 187 CHECK(value->IsNumber()); |
| 187 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); | 188 CHECK_EQ(static_cast<double>(Smi::kMinValue - 1), value->Number()); |
| 188 #endif | 189 #endif |
| 189 | 190 |
| 190 value = factory->NewNumberFromUint(static_cast<uint32_t>(Smi::kMaxValue) + 1); | 191 value = factory->NewNumberFromUint(static_cast<uint32_t>(Smi::kMaxValue) + 1); |
| 191 CHECK(value->IsHeapNumber()); | 192 CHECK(value->IsHeapNumber()); |
| 192 CHECK(value->IsNumber()); | 193 CHECK(value->IsNumber()); |
| (...skipping 4215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4408 #ifdef DEBUG | 4409 #ifdef DEBUG |
| 4409 TEST(PathTracer) { | 4410 TEST(PathTracer) { |
| 4410 CcTest::InitializeVM(); | 4411 CcTest::InitializeVM(); |
| 4411 v8::HandleScope scope(CcTest::isolate()); | 4412 v8::HandleScope scope(CcTest::isolate()); |
| 4412 | 4413 |
| 4413 v8::Local<v8::Value> result = CompileRun("'abc'"); | 4414 v8::Local<v8::Value> result = CompileRun("'abc'"); |
| 4414 Handle<Object> o = v8::Utils::OpenHandle(*result); | 4415 Handle<Object> o = v8::Utils::OpenHandle(*result); |
| 4415 CcTest::i_isolate()->heap()->TracePathToObject(*o); | 4416 CcTest::i_isolate()->heap()->TracePathToObject(*o); |
| 4416 } | 4417 } |
| 4417 #endif // DEBUG | 4418 #endif // DEBUG |
| OLD | NEW |