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

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

Issue 2516303006: [heap] Refactor heap object iteration (Closed)
Patch Set: Add comment Created 4 years 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/array-buffer-tracker.cc ('k') | src/heap/mark-compact.cc » ('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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
4702 mark_compact_collector()->VerifyWeakEmbeddedObjectsInCode(); 4702 mark_compact_collector()->VerifyWeakEmbeddedObjectsInCode();
4703 if (FLAG_omit_map_checks_for_leaf_maps) { 4703 if (FLAG_omit_map_checks_for_leaf_maps) {
4704 mark_compact_collector()->VerifyOmittedMapChecks(); 4704 mark_compact_collector()->VerifyOmittedMapChecks();
4705 } 4705 }
4706 } 4706 }
4707 #endif 4707 #endif
4708 4708
4709 4709
4710 void Heap::ZapFromSpace() { 4710 void Heap::ZapFromSpace() {
4711 if (!new_space_->IsFromSpaceCommitted()) return; 4711 if (!new_space_->IsFromSpaceCommitted()) return;
4712 for (Page* page : NewSpacePageRange(new_space_->FromSpaceStart(), 4712 for (Page* page :
4713 new_space_->FromSpaceEnd())) { 4713 PageRange(new_space_->FromSpaceStart(), new_space_->FromSpaceEnd())) {
4714 for (Address cursor = page->area_start(), limit = page->area_end(); 4714 for (Address cursor = page->area_start(), limit = page->area_end();
4715 cursor < limit; cursor += kPointerSize) { 4715 cursor < limit; cursor += kPointerSize) {
4716 Memory::Address_at(cursor) = kFromSpaceZapValue; 4716 Memory::Address_at(cursor) = kFromSpaceZapValue;
4717 } 4717 }
4718 } 4718 }
4719 } 4719 }
4720 4720
4721 class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor { 4721 class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor {
4722 public: 4722 public:
4723 IterateAndScavengePromotedObjectsVisitor(Heap* heap, HeapObject* target, 4723 IterateAndScavengePromotedObjectsVisitor(Heap* heap, HeapObject* target,
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after
6462 } 6462 }
6463 6463
6464 6464
6465 // static 6465 // static
6466 int Heap::GetStaticVisitorIdForMap(Map* map) { 6466 int Heap::GetStaticVisitorIdForMap(Map* map) {
6467 return StaticVisitorBase::GetVisitorId(map); 6467 return StaticVisitorBase::GetVisitorId(map);
6468 } 6468 }
6469 6469
6470 } // namespace internal 6470 } // namespace internal
6471 } // namespace v8 6471 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/array-buffer-tracker.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698