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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 VerifyObjectField(kArgumentsOffset); | 453 VerifyObjectField(kArgumentsOffset); |
454 VerifyObjectField(kScriptOffset); | 454 VerifyObjectField(kScriptOffset); |
455 VerifyObjectField(kStackTraceOffset); | 455 VerifyObjectField(kStackTraceOffset); |
456 VerifyObjectField(kStackFramesOffset); | 456 VerifyObjectField(kStackFramesOffset); |
457 } | 457 } |
458 | 458 |
459 | 459 |
460 void String::StringVerify() { | 460 void String::StringVerify() { |
461 CHECK(IsString()); | 461 CHECK(IsString()); |
462 CHECK(length() >= 0 && length() <= Smi::kMaxValue); | 462 CHECK(length() >= 0 && length() <= Smi::kMaxValue); |
463 if (IsSymbol()) { | 463 if (IsInternalizedString()) { |
464 CHECK(!HEAP->InNewSpace(this)); | 464 CHECK(!HEAP->InNewSpace(this)); |
465 } | 465 } |
466 if (IsConsString()) { | 466 if (IsConsString()) { |
467 ConsString::cast(this)->ConsStringVerify(); | 467 ConsString::cast(this)->ConsStringVerify(); |
468 } else if (IsSlicedString()) { | 468 } else if (IsSlicedString()) { |
469 SlicedString::cast(this)->SlicedStringVerify(); | 469 SlicedString::cast(this)->SlicedStringVerify(); |
470 } else if (IsSeqOneByteString()) { | 470 } else if (IsSeqOneByteString()) { |
471 SeqOneByteString::cast(this)->SeqOneByteStringVerify(); | 471 SeqOneByteString::cast(this)->SeqOneByteStringVerify(); |
472 } | 472 } |
473 } | 473 } |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 for (int i = 0; i < number_of_transitions(); ++i) { | 1030 for (int i = 0; i < number_of_transitions(); ++i) { |
1031 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1031 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1032 } | 1032 } |
1033 return true; | 1033 return true; |
1034 } | 1034 } |
1035 | 1035 |
1036 | 1036 |
1037 #endif // DEBUG | 1037 #endif // DEBUG |
1038 | 1038 |
1039 } } // namespace v8::internal | 1039 } } // namespace v8::internal |
OLD | NEW |