| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 461 |
| 462 void Oddball::OddballVerify() { | 462 void Oddball::OddballVerify() { |
| 463 CHECK(IsOddball()); | 463 CHECK(IsOddball()); |
| 464 VerifyHeapPointer(to_string()); | 464 VerifyHeapPointer(to_string()); |
| 465 Object* number = to_number(); | 465 Object* number = to_number(); |
| 466 if (number->IsHeapObject()) { | 466 if (number->IsHeapObject()) { |
| 467 ASSERT(number == HEAP->nan_value()); | 467 ASSERT(number == HEAP->nan_value()); |
| 468 } else { | 468 } else { |
| 469 ASSERT(number->IsSmi()); | 469 ASSERT(number->IsSmi()); |
| 470 int value = Smi::cast(number)->value(); | 470 int value = Smi::cast(number)->value(); |
| 471 // Hidden oddballs have negative smis. |
| 472 const int kLeastHiddenOddballNumber = -4; |
| 471 ASSERT(value <= 1); | 473 ASSERT(value <= 1); |
| 472 // Hidden oddballs have negative smis. | |
| 473 ASSERT(value >= kLeastHiddenOddballNumber); | 474 ASSERT(value >= kLeastHiddenOddballNumber); |
| 474 } | 475 } |
| 475 } | 476 } |
| 476 | 477 |
| 477 | 478 |
| 478 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { | 479 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { |
| 479 CHECK(IsJSGlobalPropertyCell()); | 480 CHECK(IsJSGlobalPropertyCell()); |
| 480 VerifyObjectField(kValueOffset); | 481 VerifyObjectField(kValueOffset); |
| 481 } | 482 } |
| 482 | 483 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 ASSERT(e->IsUndefined()); | 855 ASSERT(e->IsUndefined()); |
| 855 } | 856 } |
| 856 } | 857 } |
| 857 } | 858 } |
| 858 } | 859 } |
| 859 | 860 |
| 860 | 861 |
| 861 #endif // DEBUG | 862 #endif // DEBUG |
| 862 | 863 |
| 863 } } // namespace v8::internal | 864 } } // namespace v8::internal |
| OLD | NEW |