Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: src/objects-debug.cc

Issue 2683903002: Fix missing cases of empty_string canonicalization (Closed)
Patch Set: make LSan happy Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 VerifyObjectField(kEndPositionOffset); 545 VerifyObjectField(kEndPositionOffset);
546 VerifyObjectField(kArgumentsOffset); 546 VerifyObjectField(kArgumentsOffset);
547 VerifyObjectField(kScriptOffset); 547 VerifyObjectField(kScriptOffset);
548 VerifyObjectField(kStackFramesOffset); 548 VerifyObjectField(kStackFramesOffset);
549 } 549 }
550 550
551 551
552 void String::StringVerify() { 552 void String::StringVerify() {
553 CHECK(IsString()); 553 CHECK(IsString());
554 CHECK(length() >= 0 && length() <= Smi::kMaxValue); 554 CHECK(length() >= 0 && length() <= Smi::kMaxValue);
555 CHECK_IMPLIES(length() == 0, this == GetHeap()->empty_string());
555 if (IsInternalizedString()) { 556 if (IsInternalizedString()) {
556 CHECK(!GetHeap()->InNewSpace(this)); 557 CHECK(!GetHeap()->InNewSpace(this));
557 } 558 }
558 if (IsConsString()) { 559 if (IsConsString()) {
559 ConsString::cast(this)->ConsStringVerify(); 560 ConsString::cast(this)->ConsStringVerify();
560 } else if (IsSlicedString()) { 561 } else if (IsSlicedString()) {
561 SlicedString::cast(this)->SlicedStringVerify(); 562 SlicedString::cast(this)->SlicedStringVerify();
562 } else if (IsThinString()) { 563 } else if (IsThinString()) {
563 ThinString::cast(this)->ThinStringVerify(); 564 ThinString::cast(this)->ThinStringVerify();
564 } 565 }
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 1562
1562 // Both are done at the same time. 1563 // Both are done at the same time.
1563 CHECK_EQ(new_it.done(), old_it.done()); 1564 CHECK_EQ(new_it.done(), old_it.done());
1564 } 1565 }
1565 1566
1566 1567
1567 #endif // DEBUG 1568 #endif // DEBUG
1568 1569
1569 } // namespace internal 1570 } // namespace internal
1570 } // namespace v8 1571 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698