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

Side by Side Diff: src/heap/scavenger.cc

Issue 2102243002: [heap] Iterate handles with special left-trim visitor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 5 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/mark-compact.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/scavenger.h" 5 #include "src/heap/scavenger.h"
6 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/heap/objects-visiting-inl.h" 9 #include "src/heap/objects-visiting-inl.h"
10 #include "src/heap/scavenger-inl.h" 10 #include "src/heap/scavenger-inl.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 void ScavengeVisitor::VisitPointers(Object** start, Object** end) { 438 void ScavengeVisitor::VisitPointers(Object** start, Object** end) {
439 // Copy all HeapObject pointers in [start, end) 439 // Copy all HeapObject pointers in [start, end)
440 for (Object** p = start; p < end; p++) ScavengePointer(p); 440 for (Object** p = start; p < end; p++) ScavengePointer(p);
441 } 441 }
442 442
443 443
444 void ScavengeVisitor::ScavengePointer(Object** p) { 444 void ScavengeVisitor::ScavengePointer(Object** p) {
445 Object* object = *p; 445 Object* object = *p;
446 if (!heap_->InNewSpace(object)) return; 446 if (!heap_->InNewSpace(object)) return;
447 447
448 if (heap_->PurgeLeftTrimmedObject(p)) return;
449
450 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p), 448 Scavenger::ScavengeObject(reinterpret_cast<HeapObject**>(p),
451 reinterpret_cast<HeapObject*>(object)); 449 reinterpret_cast<HeapObject*>(object));
452 } 450 }
453 451
454 } // namespace internal 452 } // namespace internal
455 } // namespace v8 453 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698