| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 449 |
| 450 void Oddball::OddballVerify() { | 450 void Oddball::OddballVerify() { |
| 451 CHECK(IsOddball()); | 451 CHECK(IsOddball()); |
| 452 VerifyHeapPointer(to_string()); | 452 VerifyHeapPointer(to_string()); |
| 453 Object* number = to_number(); | 453 Object* number = to_number(); |
| 454 if (number->IsHeapObject()) { | 454 if (number->IsHeapObject()) { |
| 455 ASSERT(number == HEAP->nan_value()); | 455 ASSERT(number == HEAP->nan_value()); |
| 456 } else { | 456 } else { |
| 457 ASSERT(number->IsSmi()); | 457 ASSERT(number->IsSmi()); |
| 458 int value = Smi::cast(number)->value(); | 458 int value = Smi::cast(number)->value(); |
| 459 ASSERT(value <= 1); |
| 459 // Hidden oddballs have negative smis. | 460 // Hidden oddballs have negative smis. |
| 460 const int kLeastHiddenOddballNumber = -4; | |
| 461 ASSERT(value <= 1); | |
| 462 ASSERT(value >= kLeastHiddenOddballNumber); | 461 ASSERT(value >= kLeastHiddenOddballNumber); |
| 463 } | 462 } |
| 464 } | 463 } |
| 465 | 464 |
| 466 | 465 |
| 467 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { | 466 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { |
| 468 CHECK(IsJSGlobalPropertyCell()); | 467 CHECK(IsJSGlobalPropertyCell()); |
| 469 VerifyObjectField(kValueOffset); | 468 VerifyObjectField(kValueOffset); |
| 470 } | 469 } |
| 471 | 470 |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 ASSERT(e->IsUndefined()); | 819 ASSERT(e->IsUndefined()); |
| 821 } | 820 } |
| 822 } | 821 } |
| 823 } | 822 } |
| 824 } | 823 } |
| 825 | 824 |
| 826 | 825 |
| 827 #endif // DEBUG | 826 #endif // DEBUG |
| 828 | 827 |
| 829 } } // namespace v8::internal | 828 } } // namespace v8::internal |
| OLD | NEW |