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

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

Issue 1115853004: Reland "Remove the weak list of array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ignore empty array buffers Created 5 years, 7 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 4368 matching lines...) Expand 10 before | Expand all | Expand 10 after
4379 void MarkCompactCollector::SweepSpaces() { 4379 void MarkCompactCollector::SweepSpaces() {
4380 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_SWEEP); 4380 GCTracer::Scope gc_scope(heap()->tracer(), GCTracer::Scope::MC_SWEEP);
4381 double start_time = 0.0; 4381 double start_time = 0.0;
4382 if (FLAG_print_cumulative_gc_stat) { 4382 if (FLAG_print_cumulative_gc_stat) {
4383 start_time = base::OS::TimeCurrentMillis(); 4383 start_time = base::OS::TimeCurrentMillis();
4384 } 4384 }
4385 4385
4386 #ifdef DEBUG 4386 #ifdef DEBUG
4387 state_ = SWEEP_SPACES; 4387 state_ = SWEEP_SPACES;
4388 #endif 4388 #endif
4389 heap()->FreeDeadArrayBuffers();
4390
4389 MoveEvacuationCandidatesToEndOfPagesList(); 4391 MoveEvacuationCandidatesToEndOfPagesList();
4390 4392
4391 // Noncompacting collections simply sweep the spaces to clear the mark 4393 // Noncompacting collections simply sweep the spaces to clear the mark
4392 // bits and free the nonlive blocks (for old and map spaces). We sweep 4394 // bits and free the nonlive blocks (for old and map spaces). We sweep
4393 // the map space last because freeing non-live maps overwrites them and 4395 // the map space last because freeing non-live maps overwrites them and
4394 // the other spaces rely on possibly non-live maps to get the sizes for 4396 // the other spaces rely on possibly non-live maps to get the sizes for
4395 // non-live objects. 4397 // non-live objects.
4396 { 4398 {
4397 GCTracer::Scope sweep_scope(heap()->tracer(), 4399 GCTracer::Scope sweep_scope(heap()->tracer(),
4398 GCTracer::Scope::MC_SWEEP_OLDSPACE); 4400 GCTracer::Scope::MC_SWEEP_OLDSPACE);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
4729 SlotsBuffer* buffer = *buffer_address; 4731 SlotsBuffer* buffer = *buffer_address;
4730 while (buffer != NULL) { 4732 while (buffer != NULL) {
4731 SlotsBuffer* next_buffer = buffer->next(); 4733 SlotsBuffer* next_buffer = buffer->next();
4732 DeallocateBuffer(buffer); 4734 DeallocateBuffer(buffer);
4733 buffer = next_buffer; 4735 buffer = next_buffer;
4734 } 4736 }
4735 *buffer_address = NULL; 4737 *buffer_address = NULL;
4736 } 4738 }
4737 } 4739 }
4738 } // namespace v8::internal 4740 } // namespace v8::internal
OLDNEW
« src/heap/heap.cc ('K') | « src/heap/heap.cc ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698