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

Side by Side Diff: src/incremental-marking-inl.h

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/incremental-marking.cc ('k') | src/interface.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 #ifndef V8_INCREMENTAL_MARKING_INL_H_ 5 #ifndef V8_INCREMENTAL_MARKING_INL_H_
6 #define V8_INCREMENTAL_MARKING_INL_H_ 6 #define V8_INCREMENTAL_MARKING_INL_H_
7 7
8 #include "src/incremental-marking.h" 8 #include "src/incremental-marking.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 BlackToGreyAndUnshift(obj, obj_bit); 78 BlackToGreyAndUnshift(obj, obj_bit);
79 RestartIfNotMarking(); 79 RestartIfNotMarking();
80 } 80 }
81 } 81 }
82 } 82 }
83 83
84 84
85 void IncrementalMarking::BlackToGreyAndUnshift(HeapObject* obj, 85 void IncrementalMarking::BlackToGreyAndUnshift(HeapObject* obj,
86 MarkBit mark_bit) { 86 MarkBit mark_bit) {
87 ASSERT(Marking::MarkBitFrom(obj) == mark_bit); 87 DCHECK(Marking::MarkBitFrom(obj) == mark_bit);
88 ASSERT(obj->Size() >= 2*kPointerSize); 88 DCHECK(obj->Size() >= 2*kPointerSize);
89 ASSERT(IsMarking()); 89 DCHECK(IsMarking());
90 Marking::BlackToGrey(mark_bit); 90 Marking::BlackToGrey(mark_bit);
91 int obj_size = obj->Size(); 91 int obj_size = obj->Size();
92 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), -obj_size); 92 MemoryChunk::IncrementLiveBytesFromGC(obj->address(), -obj_size);
93 bytes_scanned_ -= obj_size; 93 bytes_scanned_ -= obj_size;
94 int64_t old_bytes_rescanned = bytes_rescanned_; 94 int64_t old_bytes_rescanned = bytes_rescanned_;
95 bytes_rescanned_ = old_bytes_rescanned + obj_size; 95 bytes_rescanned_ = old_bytes_rescanned + obj_size;
96 if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) { 96 if ((bytes_rescanned_ >> 20) != (old_bytes_rescanned >> 20)) {
97 if (bytes_rescanned_ > 2 * heap_->PromotedSpaceSizeOfObjects()) { 97 if (bytes_rescanned_ > 2 * heap_->PromotedSpaceSizeOfObjects()) {
98 // If we have queued twice the heap size for rescanning then we are 98 // If we have queued twice the heap size for rescanning then we are
99 // going around in circles, scanning the same objects again and again 99 // going around in circles, scanning the same objects again and again
(...skipping 13 matching lines...) Expand all
113 113
114 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) { 114 void IncrementalMarking::WhiteToGreyAndPush(HeapObject* obj, MarkBit mark_bit) {
115 Marking::WhiteToGrey(mark_bit); 115 Marking::WhiteToGrey(mark_bit);
116 marking_deque_.PushGrey(obj); 116 marking_deque_.PushGrey(obj);
117 } 117 }
118 118
119 119
120 } } // namespace v8::internal 120 } } // namespace v8::internal
121 121
122 #endif // V8_INCREMENTAL_MARKING_INL_H_ 122 #endif // V8_INCREMENTAL_MARKING_INL_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698