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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 3682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3693 FreeSpace::cast(filler)->nobarrier_set_size(size); | 3693 FreeSpace::cast(filler)->nobarrier_set_size(size); |
3694 } | 3694 } |
3695 // At this point, we may be deserializing the heap from a snapshot, and | 3695 // At this point, we may be deserializing the heap from a snapshot, and |
3696 // none of the maps have been created yet and are NULL. | 3696 // none of the maps have been created yet and are NULL. |
3697 DCHECK((filler->map() == NULL && !deserialization_complete_) || | 3697 DCHECK((filler->map() == NULL && !deserialization_complete_) || |
3698 filler->map()->IsMap()); | 3698 filler->map()->IsMap()); |
3699 } | 3699 } |
3700 | 3700 |
3701 | 3701 |
3702 bool Heap::CanMoveObjectStart(HeapObject* object) { | 3702 bool Heap::CanMoveObjectStart(HeapObject* object) { |
| 3703 if (!FLAG_move_object_start) return false; |
| 3704 |
3703 Address address = object->address(); | 3705 Address address = object->address(); |
3704 | 3706 |
3705 if (lo_space()->Contains(object)) return false; | 3707 if (lo_space()->Contains(object)) return false; |
3706 | 3708 |
3707 Page* page = Page::FromAddress(address); | 3709 Page* page = Page::FromAddress(address); |
3708 // We can move the object start if: | 3710 // We can move the object start if: |
3709 // (1) the object is not in old space, | 3711 // (1) the object is not in old space, |
3710 // (2) the page of the object was already swept, | 3712 // (2) the page of the object was already swept, |
3711 // (3) the page was already concurrently swept. This case is an optimization | 3713 // (3) the page was already concurrently swept. This case is an optimization |
3712 // for concurrent sweeping. The WasSwept predicate for concurrently swept | 3714 // for concurrent sweeping. The WasSwept predicate for concurrently swept |
(...skipping 3164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6877 *object_type = "CODE_TYPE"; \ | 6879 *object_type = "CODE_TYPE"; \ |
6878 *object_sub_type = "CODE_AGE/" #name; \ | 6880 *object_sub_type = "CODE_AGE/" #name; \ |
6879 return true; | 6881 return true; |
6880 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6882 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
6881 #undef COMPARE_AND_RETURN_NAME | 6883 #undef COMPARE_AND_RETURN_NAME |
6882 } | 6884 } |
6883 return false; | 6885 return false; |
6884 } | 6886 } |
6885 } // namespace internal | 6887 } // namespace internal |
6886 } // namespace v8 | 6888 } // namespace v8 |
OLD | NEW |