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

Side by Side Diff: src/heap/mark-compact.cc

Issue 990203002: Make VerifyMarking work in the presence of grey objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates 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 | « no previous file | no next file » | 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 93
94 static void VerifyMarking(Heap* heap, Address bottom, Address top) { 94 static void VerifyMarking(Heap* heap, Address bottom, Address top) {
95 VerifyMarkingVisitor visitor(heap); 95 VerifyMarkingVisitor visitor(heap);
96 HeapObject* object; 96 HeapObject* object;
97 Address next_object_must_be_here_or_later = bottom; 97 Address next_object_must_be_here_or_later = bottom;
98 98
99 for (Address current = bottom; current < top; current += kPointerSize) { 99 for (Address current = bottom; current < top; current += kPointerSize) {
100 object = HeapObject::FromAddress(current); 100 object = HeapObject::FromAddress(current);
101 if (MarkCompactCollector::IsMarked(object)) { 101 if (MarkCompactCollector::IsMarked(object)) {
102 CHECK(Marking::IsBlack(Marking::MarkBitFrom(object)));
102 CHECK(current >= next_object_must_be_here_or_later); 103 CHECK(current >= next_object_must_be_here_or_later);
103 object->Iterate(&visitor); 104 object->Iterate(&visitor);
104 next_object_must_be_here_or_later = current + object->Size(); 105 next_object_must_be_here_or_later = current + object->Size();
105 } 106 }
106 } 107 }
107 } 108 }
108 109
109 110
110 static void VerifyMarking(NewSpace* space) { 111 static void VerifyMarking(NewSpace* space) {
111 Address end = space->top(); 112 Address end = space->top();
(...skipping 4384 matching lines...) Expand 10 before | Expand all | Expand 10 after
4496 SlotsBuffer* buffer = *buffer_address; 4497 SlotsBuffer* buffer = *buffer_address;
4497 while (buffer != NULL) { 4498 while (buffer != NULL) {
4498 SlotsBuffer* next_buffer = buffer->next(); 4499 SlotsBuffer* next_buffer = buffer->next();
4499 DeallocateBuffer(buffer); 4500 DeallocateBuffer(buffer);
4500 buffer = next_buffer; 4501 buffer = next_buffer;
4501 } 4502 }
4502 *buffer_address = NULL; 4503 *buffer_address = NULL;
4503 } 4504 }
4504 } 4505 }
4505 } // namespace v8::internal 4506 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698