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

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

Issue 1115043005: Revert of Remove the weak list of array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/objects-visiting.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 #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
4391 MoveEvacuationCandidatesToEndOfPagesList(); 4389 MoveEvacuationCandidatesToEndOfPagesList();
4392 4390
4393 // Noncompacting collections simply sweep the spaces to clear the mark 4391 // Noncompacting collections simply sweep the spaces to clear the mark
4394 // bits and free the nonlive blocks (for old and map spaces). We sweep 4392 // bits and free the nonlive blocks (for old and map spaces). We sweep
4395 // the map space last because freeing non-live maps overwrites them and 4393 // the map space last because freeing non-live maps overwrites them and
4396 // the other spaces rely on possibly non-live maps to get the sizes for 4394 // the other spaces rely on possibly non-live maps to get the sizes for
4397 // non-live objects. 4395 // non-live objects.
4398 { 4396 {
4399 GCTracer::Scope sweep_scope(heap()->tracer(), 4397 GCTracer::Scope sweep_scope(heap()->tracer(),
4400 GCTracer::Scope::MC_SWEEP_OLDSPACE); 4398 GCTracer::Scope::MC_SWEEP_OLDSPACE);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
4731 SlotsBuffer* buffer = *buffer_address; 4729 SlotsBuffer* buffer = *buffer_address;
4732 while (buffer != NULL) { 4730 while (buffer != NULL) {
4733 SlotsBuffer* next_buffer = buffer->next(); 4731 SlotsBuffer* next_buffer = buffer->next();
4734 DeallocateBuffer(buffer); 4732 DeallocateBuffer(buffer);
4735 buffer = next_buffer; 4733 buffer = next_buffer;
4736 } 4734 }
4737 *buffer_address = NULL; 4735 *buffer_address = NULL;
4738 } 4736 }
4739 } 4737 }
4740 } // namespace v8::internal 4738 } // namespace v8::internal
OLDNEW
« no previous file with comments | « 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