| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 } else if (IsSlicedString()) { | 467 } else if (IsSlicedString()) { |
| 468 SlicedString::cast(this)->SlicedStringVerify(); | 468 SlicedString::cast(this)->SlicedStringVerify(); |
| 469 } else if (IsSeqOneByteString()) { | 469 } else if (IsSeqOneByteString()) { |
| 470 SeqOneByteString::cast(this)->SeqOneByteStringVerify(); | 470 SeqOneByteString::cast(this)->SeqOneByteStringVerify(); |
| 471 } | 471 } |
| 472 } | 472 } |
| 473 | 473 |
| 474 | 474 |
| 475 void SeqOneByteString::SeqOneByteStringVerify() { | 475 void SeqOneByteString::SeqOneByteStringVerify() { |
| 476 #ifndef ENABLE_LATIN_1 | 476 #ifndef ENABLE_LATIN_1 |
| 477 CHECK(String::IsAscii(GetChars(), length())); | 477 CHECK(!HasOnlyAsciiChars() || String::IsAscii(GetChars(), length())); |
| 478 #endif | 478 #endif |
| 479 } | 479 } |
| 480 | 480 |
| 481 | 481 |
| 482 void ConsString::ConsStringVerify() { | 482 void ConsString::ConsStringVerify() { |
| 483 CHECK(this->first()->IsString()); | 483 CHECK(this->first()->IsString()); |
| 484 CHECK(this->second() == GetHeap()->empty_string() || | 484 CHECK(this->second() == GetHeap()->empty_string() || |
| 485 this->second()->IsString()); | 485 this->second()->IsString()); |
| 486 CHECK(this->length() >= ConsString::kMinLength); | 486 CHECK(this->length() >= ConsString::kMinLength); |
| 487 if (this->IsFlat()) { | 487 if (this->IsFlat()) { |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 for (int i = 0; i < number_of_transitions(); ++i) { | 1014 for (int i = 0; i < number_of_transitions(); ++i) { |
| 1015 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1015 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
| 1016 } | 1016 } |
| 1017 return true; | 1017 return true; |
| 1018 } | 1018 } |
| 1019 | 1019 |
| 1020 | 1020 |
| 1021 #endif // DEBUG | 1021 #endif // DEBUG |
| 1022 | 1022 |
| 1023 } } // namespace v8::internal | 1023 } } // namespace v8::internal |
| OLD | NEW |