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

Side by Side Diff: src/heap/heap-inl.h

Issue 1035763002: Add CHECKs when updating pointers from the slots and store buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updatser Created 5 years, 9 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/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('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 #ifndef V8_HEAP_HEAP_INL_H_ 5 #ifndef V8_HEAP_HEAP_INL_H_
6 #define V8_HEAP_HEAP_INL_H_ 6 #define V8_HEAP_HEAP_INL_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 // object to record the forwarding pointer. A forwarding pointer can 540 // object to record the forwarding pointer. A forwarding pointer can
541 // point to an old space, the code space, or the to space of the new 541 // point to an old space, the code space, or the to space of the new
542 // generation. 542 // generation.
543 MapWord first_word = object->map_word(); 543 MapWord first_word = object->map_word();
544 544
545 // If the first word is a forwarding address, the object has already been 545 // If the first word is a forwarding address, the object has already been
546 // copied. 546 // copied.
547 if (first_word.IsForwardingAddress()) { 547 if (first_word.IsForwardingAddress()) {
548 HeapObject* dest = first_word.ToForwardingAddress(); 548 HeapObject* dest = first_word.ToForwardingAddress();
549 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p)); 549 DCHECK(object->GetIsolate()->heap()->InFromSpace(*p));
550 // TODO(jochen): Remove again after fixing http://crbug.com/452095
551 CHECK((*p)->IsHeapObject() && dest->IsHeapObject());
550 *p = dest; 552 *p = dest;
551 return; 553 return;
552 } 554 }
553 555
554 UpdateAllocationSiteFeedback(object, IGNORE_SCRATCHPAD_SLOT); 556 UpdateAllocationSiteFeedback(object, IGNORE_SCRATCHPAD_SLOT);
555 557
556 // AllocationMementos are unrooted and shouldn't survive a scavenge 558 // AllocationMementos are unrooted and shouldn't survive a scavenge
557 DCHECK(object->map() != object->GetHeap()->allocation_memento_map()); 559 DCHECK(object->map() != object->GetHeap()->allocation_memento_map());
558 // Call the slow part of scavenge object. 560 // Call the slow part of scavenge object.
559 return ScavengeObjectSlow(p, object); 561 return ScavengeObjectSlow(p, object);
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 735
734 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { 736 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) {
735 for (Object** current = start; current < end; current++) { 737 for (Object** current = start; current < end; current++) {
736 CHECK((*current)->IsSmi()); 738 CHECK((*current)->IsSmi());
737 } 739 }
738 } 740 }
739 } 741 }
740 } // namespace v8::internal 742 } // namespace v8::internal
741 743
742 #endif // V8_HEAP_HEAP_INL_H_ 744 #endif // V8_HEAP_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698