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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 ConsString::cast(this)->ConsStringVerify(); | 466 ConsString::cast(this)->ConsStringVerify(); |
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 CHECK(String::IsAscii(GetChars(), length())); | 476 #ifndef ENABLE_LATIN_1 |
| 477 CHECK(!HasOnlyAsciiChars() || String::IsAscii(GetChars(), length())); |
| 478 #endif |
477 } | 479 } |
478 | 480 |
479 | 481 |
480 void ConsString::ConsStringVerify() { | 482 void ConsString::ConsStringVerify() { |
481 CHECK(this->first()->IsString()); | 483 CHECK(this->first()->IsString()); |
482 CHECK(this->second() == GetHeap()->empty_string() || | 484 CHECK(this->second() == GetHeap()->empty_string() || |
483 this->second()->IsString()); | 485 this->second()->IsString()); |
484 CHECK(this->length() >= ConsString::kMinLength); | 486 CHECK(this->length() >= ConsString::kMinLength); |
485 if (this->IsFlat()) { | 487 if (this->IsFlat()) { |
486 // A flat cons can only be created by String::SlowTryFlatten. | 488 // A flat cons can only be created by String::SlowTryFlatten. |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 for (int i = 0; i < number_of_transitions(); ++i) { | 1007 for (int i = 0; i < number_of_transitions(); ++i) { |
1006 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1008 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1007 } | 1009 } |
1008 return true; | 1010 return true; |
1009 } | 1011 } |
1010 | 1012 |
1011 | 1013 |
1012 #endif // DEBUG | 1014 #endif // DEBUG |
1013 | 1015 |
1014 } } // namespace v8::internal | 1016 } } // namespace v8::internal |
OLD | NEW |