| 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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } else if (IsSlicedString()) { | 381 } else if (IsSlicedString()) { |
| 382 SlicedString::cast(this)->SlicedStringVerify(); | 382 SlicedString::cast(this)->SlicedStringVerify(); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 | 385 |
| 386 | 386 |
| 387 void ConsString::ConsStringVerify() { | 387 void ConsString::ConsStringVerify() { |
| 388 CHECK(this->first()->IsString()); | 388 CHECK(this->first()->IsString()); |
| 389 CHECK(this->second() == GetHeap()->empty_string() || | 389 CHECK(this->second() == GetHeap()->empty_string() || |
| 390 this->second()->IsString()); | 390 this->second()->IsString()); |
| 391 CHECK(this->length() >= String::kMinNonFlatLength); | 391 CHECK(this->length() >= ConsString::kMinLength); |
| 392 if (this->IsFlat()) { | 392 if (this->IsFlat()) { |
| 393 // A flat cons can only be created by String::SlowTryFlatten. | 393 // A flat cons can only be created by String::SlowTryFlatten. |
| 394 // Afterwards, the first part may be externalized. | 394 // Afterwards, the first part may be externalized. |
| 395 CHECK(this->first()->IsSeqString() || this->first()->IsExternalString()); | 395 CHECK(this->first()->IsSeqString() || this->first()->IsExternalString()); |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 | 399 |
| 400 void SlicedString::SlicedStringVerify() { | 400 void SlicedString::SlicedStringVerify() { |
| 401 CHECK(!this->parent()->IsConsString()); | 401 CHECK(!this->parent()->IsConsString()); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 ASSERT(e->IsUndefined()); | 854 ASSERT(e->IsUndefined()); |
| 855 } | 855 } |
| 856 } | 856 } |
| 857 } | 857 } |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 #endif // DEBUG | 861 #endif // DEBUG |
| 862 | 862 |
| 863 } } // namespace v8::internal | 863 } } // namespace v8::internal |
| OLD | NEW |