OLD | NEW |
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 4696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4707 mark_compact_collector()->VerifyWeakEmbeddedObjectsInCode(); | 4707 mark_compact_collector()->VerifyWeakEmbeddedObjectsInCode(); |
4708 if (FLAG_omit_map_checks_for_leaf_maps) { | 4708 if (FLAG_omit_map_checks_for_leaf_maps) { |
4709 mark_compact_collector()->VerifyOmittedMapChecks(); | 4709 mark_compact_collector()->VerifyOmittedMapChecks(); |
4710 } | 4710 } |
4711 } | 4711 } |
4712 #endif | 4712 #endif |
4713 | 4713 |
4714 | 4714 |
4715 void Heap::ZapFromSpace() { | 4715 void Heap::ZapFromSpace() { |
4716 if (!new_space_->IsFromSpaceCommitted()) return; | 4716 if (!new_space_->IsFromSpaceCommitted()) return; |
4717 for (Page* page : NewSpacePageRange(new_space_->FromSpaceStart(), | 4717 for (Page* page : |
4718 new_space_->FromSpaceEnd())) { | 4718 PageRange(new_space_->FromSpaceStart(), new_space_->FromSpaceEnd())) { |
4719 for (Address cursor = page->area_start(), limit = page->area_end(); | 4719 for (Address cursor = page->area_start(), limit = page->area_end(); |
4720 cursor < limit; cursor += kPointerSize) { | 4720 cursor < limit; cursor += kPointerSize) { |
4721 Memory::Address_at(cursor) = kFromSpaceZapValue; | 4721 Memory::Address_at(cursor) = kFromSpaceZapValue; |
4722 } | 4722 } |
4723 } | 4723 } |
4724 } | 4724 } |
4725 | 4725 |
4726 class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor { | 4726 class IterateAndScavengePromotedObjectsVisitor final : public ObjectVisitor { |
4727 public: | 4727 public: |
4728 IterateAndScavengePromotedObjectsVisitor(Heap* heap, HeapObject* target, | 4728 IterateAndScavengePromotedObjectsVisitor(Heap* heap, HeapObject* target, |
(...skipping 1738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6467 } | 6467 } |
6468 | 6468 |
6469 | 6469 |
6470 // static | 6470 // static |
6471 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6471 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6472 return StaticVisitorBase::GetVisitorId(map); | 6472 return StaticVisitorBase::GetVisitorId(map); |
6473 } | 6473 } |
6474 | 6474 |
6475 } // namespace internal | 6475 } // namespace internal |
6476 } // namespace v8 | 6476 } // namespace v8 |
OLD | NEW |