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/v8.h" | 5 #include "src/v8.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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 6193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6204 public: | 6204 public: |
6205 explicit UnreachableObjectsFilter(Heap* heap) : heap_(heap) { | 6205 explicit UnreachableObjectsFilter(Heap* heap) : heap_(heap) { |
6206 MarkReachableObjects(); | 6206 MarkReachableObjects(); |
6207 } | 6207 } |
6208 | 6208 |
6209 ~UnreachableObjectsFilter() { | 6209 ~UnreachableObjectsFilter() { |
6210 heap_->mark_compact_collector()->ClearMarkbits(); | 6210 heap_->mark_compact_collector()->ClearMarkbits(); |
6211 } | 6211 } |
6212 | 6212 |
6213 bool SkipObject(HeapObject* object) { | 6213 bool SkipObject(HeapObject* object) { |
| 6214 if (object->IsFiller()) return true; |
6214 MarkBit mark_bit = Marking::MarkBitFrom(object); | 6215 MarkBit mark_bit = Marking::MarkBitFrom(object); |
6215 return Marking::IsWhite(mark_bit); | 6216 return Marking::IsWhite(mark_bit); |
6216 } | 6217 } |
6217 | 6218 |
6218 private: | 6219 private: |
6219 class MarkingVisitor : public ObjectVisitor { | 6220 class MarkingVisitor : public ObjectVisitor { |
6220 public: | 6221 public: |
6221 MarkingVisitor() : marking_stack_(10) {} | 6222 MarkingVisitor() : marking_stack_(10) {} |
6222 | 6223 |
6223 void VisitPointers(Object** start, Object** end) { | 6224 void VisitPointers(Object** start, Object** end) { |
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6918 *object_type = "CODE_TYPE"; \ | 6919 *object_type = "CODE_TYPE"; \ |
6919 *object_sub_type = "CODE_AGE/" #name; \ | 6920 *object_sub_type = "CODE_AGE/" #name; \ |
6920 return true; | 6921 return true; |
6921 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6922 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6922 #undef COMPARE_AND_RETURN_NAME | 6923 #undef COMPARE_AND_RETURN_NAME |
6923 } | 6924 } |
6924 return false; | 6925 return false; |
6925 } | 6926 } |
6926 } // namespace internal | 6927 } // namespace internal |
6927 } // namespace v8 | 6928 } // namespace v8 |
OLD | NEW |