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 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 heap_->always_allocate_scope_depth_++; | 722 heap_->always_allocate_scope_depth_++; |
723 } | 723 } |
724 | 724 |
725 | 725 |
726 AlwaysAllocateScope::~AlwaysAllocateScope() { | 726 AlwaysAllocateScope::~AlwaysAllocateScope() { |
727 heap_->always_allocate_scope_depth_--; | 727 heap_->always_allocate_scope_depth_--; |
728 DCHECK(heap_->always_allocate_scope_depth_ == 0); | 728 DCHECK(heap_->always_allocate_scope_depth_ == 0); |
729 } | 729 } |
730 | 730 |
731 | 731 |
732 #ifdef VERIFY_HEAP | |
733 NoWeakObjectVerificationScope::NoWeakObjectVerificationScope() { | |
734 Isolate* isolate = Isolate::Current(); | |
735 isolate->heap()->no_weak_object_verification_scope_depth_++; | |
736 } | |
737 | |
738 | |
739 NoWeakObjectVerificationScope::~NoWeakObjectVerificationScope() { | |
740 Isolate* isolate = Isolate::Current(); | |
741 isolate->heap()->no_weak_object_verification_scope_depth_--; | |
742 } | |
743 #endif | |
744 | |
745 | |
746 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { | 732 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { |
747 heap_->gc_callbacks_depth_++; | 733 heap_->gc_callbacks_depth_++; |
748 } | 734 } |
749 | 735 |
750 | 736 |
751 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } | 737 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } |
752 | 738 |
753 | 739 |
754 bool GCCallbacksScope::CheckReenter() { | 740 bool GCCallbacksScope::CheckReenter() { |
755 return heap_->gc_callbacks_depth_ == 1; | 741 return heap_->gc_callbacks_depth_ == 1; |
(...skipping 13 matching lines...) Expand all Loading... |
769 | 755 |
770 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 756 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
771 for (Object** current = start; current < end; current++) { | 757 for (Object** current = start; current < end; current++) { |
772 CHECK((*current)->IsSmi()); | 758 CHECK((*current)->IsSmi()); |
773 } | 759 } |
774 } | 760 } |
775 } | 761 } |
776 } // namespace v8::internal | 762 } // namespace v8::internal |
777 | 763 |
778 #endif // V8_HEAP_HEAP_INL_H_ | 764 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |