| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 void Oddball::OddballVerify() { | 526 void Oddball::OddballVerify() { |
| 527 CHECK(IsOddball()); | 527 CHECK(IsOddball()); |
| 528 VerifyHeapPointer(to_string()); | 528 VerifyHeapPointer(to_string()); |
| 529 Object* number = to_number(); | 529 Object* number = to_number(); |
| 530 if (number->IsHeapObject()) { | 530 if (number->IsHeapObject()) { |
| 531 ASSERT(number == HEAP->nan_value()); | 531 ASSERT(number == HEAP->nan_value()); |
| 532 } else { | 532 } else { |
| 533 ASSERT(number->IsSmi()); | 533 ASSERT(number->IsSmi()); |
| 534 int value = Smi::cast(number)->value(); | 534 int value = Smi::cast(number)->value(); |
| 535 // Hidden oddballs have negative smis. |
| 536 const int kLeastHiddenOddballNumber = -4; |
| 535 ASSERT(value <= 1); | 537 ASSERT(value <= 1); |
| 536 // Hidden oddballs have negative smis. | |
| 537 ASSERT(value >= kLeastHiddenOddballNumber); | 538 ASSERT(value >= kLeastHiddenOddballNumber); |
| 538 } | 539 } |
| 539 } | 540 } |
| 540 | 541 |
| 541 | 542 |
| 542 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { | 543 void JSGlobalPropertyCell::JSGlobalPropertyCellVerify() { |
| 543 CHECK(IsJSGlobalPropertyCell()); | 544 CHECK(IsJSGlobalPropertyCell()); |
| 544 VerifyObjectField(kValueOffset); | 545 VerifyObjectField(kValueOffset); |
| 545 } | 546 } |
| 546 | 547 |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 918 ASSERT(e->IsUndefined()); | 919 ASSERT(e->IsUndefined()); |
| 919 } | 920 } |
| 920 } | 921 } |
| 921 } | 922 } |
| 922 } | 923 } |
| 923 | 924 |
| 924 | 925 |
| 925 #endif // DEBUG | 926 #endif // DEBUG |
| 926 | 927 |
| 927 } } // namespace v8::internal | 928 } } // namespace v8::internal |
| OLD | NEW |