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

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

Issue 1288413002: Make some foo.h headers usable without foo-inl.h header. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2218 if (!aborting) { 2218 if (!aborting) {
2219 DCHECK(IsEmpty()); 2219 DCHECK(IsEmpty());
2220 DCHECK(!overflowed_); 2220 DCHECK(!overflowed_);
2221 } 2221 }
2222 DCHECK(in_use_); 2222 DCHECK(in_use_);
2223 top_ = bottom_ = 0xdecbad; 2223 top_ = bottom_ = 0xdecbad;
2224 in_use_ = false; 2224 in_use_ = false;
2225 } 2225 }
2226 2226
2227 2227
2228 void MarkingDeque::DecrementLiveBytes(HeapObject* object) {
2229 MemoryChunk::IncrementLiveBytesFromGC(object, -object->Size());
2230 }
2231
2232
2228 void MarkCompactCollector::MarkLiveObjects() { 2233 void MarkCompactCollector::MarkLiveObjects() {
2229 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK); 2234 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_MARK);
2230 double start_time = 0.0; 2235 double start_time = 0.0;
2231 if (FLAG_print_cumulative_gc_stat) { 2236 if (FLAG_print_cumulative_gc_stat) {
2232 start_time = base::OS::TimeCurrentMillis(); 2237 start_time = base::OS::TimeCurrentMillis();
2233 } 2238 }
2234 // The recursive GC marker detects when it is nearing stack overflow, 2239 // The recursive GC marker detects when it is nearing stack overflow,
2235 // and switches to a different marking system. JS interrupts interfere 2240 // and switches to a different marking system. JS interrupts interfere
2236 // with the C stack limit check. 2241 // with the C stack limit check.
2237 PostponeInterruptsScope postpone(isolate()); 2242 PostponeInterruptsScope postpone(isolate());
(...skipping 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
4735 SlotsBuffer* buffer = *buffer_address; 4740 SlotsBuffer* buffer = *buffer_address;
4736 while (buffer != NULL) { 4741 while (buffer != NULL) {
4737 SlotsBuffer* next_buffer = buffer->next(); 4742 SlotsBuffer* next_buffer = buffer->next();
4738 DeallocateBuffer(buffer); 4743 DeallocateBuffer(buffer);
4739 buffer = next_buffer; 4744 buffer = next_buffer;
4740 } 4745 }
4741 *buffer_address = NULL; 4746 *buffer_address = NULL;
4742 } 4747 }
4743 } // namespace internal 4748 } // namespace internal
4744 } // namespace v8 4749 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698