| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/objects.h" | 5 #include "src/objects.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/disasm.h" | 8 #include "src/disasm.h" |
| 9 #include "src/disassembler.h" | 9 #include "src/disassembler.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 JSObjectVerify(); | 594 JSObjectVerify(); |
| 595 } | 595 } |
| 596 | 596 |
| 597 | 597 |
| 598 void Oddball::OddballVerify() { | 598 void Oddball::OddballVerify() { |
| 599 CHECK(IsOddball()); | 599 CHECK(IsOddball()); |
| 600 Heap* heap = GetHeap(); | 600 Heap* heap = GetHeap(); |
| 601 VerifyHeapPointer(to_string()); | 601 VerifyHeapPointer(to_string()); |
| 602 Object* number = to_number(); | 602 Object* number = to_number(); |
| 603 if (number->IsHeapObject()) { | 603 if (number->IsHeapObject()) { |
| 604 CHECK(number == heap->nan_value()); | 604 CHECK(number == heap->nan_value() || |
| 605 number == heap->hole_nan_value()); |
| 605 } else { | 606 } else { |
| 606 CHECK(number->IsSmi()); | 607 CHECK(number->IsSmi()); |
| 607 int value = Smi::cast(number)->value(); | 608 int value = Smi::cast(number)->value(); |
| 608 // Hidden oddballs have negative smis. | 609 // Hidden oddballs have negative smis. |
| 609 const int kLeastHiddenOddballNumber = -7; | 610 const int kLeastHiddenOddballNumber = -7; |
| 610 CHECK_LE(value, 1); | 611 CHECK_LE(value, 1); |
| 611 CHECK(value >= kLeastHiddenOddballNumber); | 612 CHECK(value >= kLeastHiddenOddballNumber); |
| 612 } | 613 } |
| 613 if (map() == heap->undefined_map()) { | 614 if (map() == heap->undefined_map()) { |
| 614 CHECK(this == heap->undefined_value()); | 615 CHECK(this == heap->undefined_value()); |
| (...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 | 1334 |
| 1334 // Both are done at the same time. | 1335 // Both are done at the same time. |
| 1335 CHECK_EQ(new_it.done(), old_it.done()); | 1336 CHECK_EQ(new_it.done(), old_it.done()); |
| 1336 } | 1337 } |
| 1337 | 1338 |
| 1338 | 1339 |
| 1339 #endif // DEBUG | 1340 #endif // DEBUG |
| 1340 | 1341 |
| 1341 } // namespace internal | 1342 } // namespace internal |
| 1342 } // namespace v8 | 1343 } // namespace v8 |
| OLD | NEW |