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 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |