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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 2640783007: [heap] Marking cleanup (Closed)
Patch Set: Compilation fixes Created 3 years, 11 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 | src/heap/mark-compact.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/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 Object* weak_cell_obj = heap()->encountered_weak_cells(); 616 Object* weak_cell_obj = heap()->encountered_weak_cells();
617 Object* weak_cell_head = Smi::kZero; 617 Object* weak_cell_head = Smi::kZero;
618 WeakCell* prev_weak_cell_obj = NULL; 618 WeakCell* prev_weak_cell_obj = NULL;
619 while (weak_cell_obj != Smi::kZero) { 619 while (weak_cell_obj != Smi::kZero) {
620 WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj); 620 WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj);
621 // We do not insert cleared weak cells into the list, so the value 621 // We do not insert cleared weak cells into the list, so the value
622 // cannot be a Smi here. 622 // cannot be a Smi here.
623 HeapObject* value = HeapObject::cast(weak_cell->value()); 623 HeapObject* value = HeapObject::cast(weak_cell->value());
624 // Remove weak cells with live objects from the list, they do not need 624 // Remove weak cells with live objects from the list, they do not need
625 // clearing. 625 // clearing.
626 if (MarkCompactCollector::IsMarked(value)) { 626 if (ObjectMarking::IsBlackOrGrey(value)) {
627 // Record slot, if value is pointing to an evacuation candidate. 627 // Record slot, if value is pointing to an evacuation candidate.
628 Object** slot = HeapObject::RawField(weak_cell, WeakCell::kValueOffset); 628 Object** slot = HeapObject::RawField(weak_cell, WeakCell::kValueOffset);
629 heap_->mark_compact_collector()->RecordSlot(weak_cell, slot, *slot); 629 heap_->mark_compact_collector()->RecordSlot(weak_cell, slot, *slot);
630 // Remove entry somewhere after top. 630 // Remove entry somewhere after top.
631 if (prev_weak_cell_obj != NULL) { 631 if (prev_weak_cell_obj != NULL) {
632 prev_weak_cell_obj->set_next(weak_cell->next()); 632 prev_weak_cell_obj->set_next(weak_cell->next());
633 } 633 }
634 weak_cell_obj = weak_cell->next(); 634 weak_cell_obj = weak_cell->next();
635 weak_cell->clear_next(the_hole_value); 635 weak_cell->clear_next(the_hole_value);
636 } else { 636 } else {
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 idle_marking_delay_counter_++; 1189 idle_marking_delay_counter_++;
1190 } 1190 }
1191 1191
1192 1192
1193 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1193 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1194 idle_marking_delay_counter_ = 0; 1194 idle_marking_delay_counter_ = 0;
1195 } 1195 }
1196 1196
1197 } // namespace internal 1197 } // namespace internal
1198 } // namespace v8 1198 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698