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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 | 742 |
743 | 743 |
744 void Heap::SetSetterStubDeoptPCOffset(int pc_offset) { | 744 void Heap::SetSetterStubDeoptPCOffset(int pc_offset) { |
745 DCHECK(setter_stub_deopt_pc_offset() == Smi::FromInt(0)); | 745 DCHECK(setter_stub_deopt_pc_offset() == Smi::FromInt(0)); |
746 set_setter_stub_deopt_pc_offset(Smi::FromInt(pc_offset)); | 746 set_setter_stub_deopt_pc_offset(Smi::FromInt(pc_offset)); |
747 } | 747 } |
748 | 748 |
749 | 749 |
750 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) | 750 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) |
751 : heap_(isolate->heap()), daf_(isolate) { | 751 : heap_(isolate->heap()), daf_(isolate) { |
752 heap_->always_allocate_scope_depth_++; | 752 heap_->always_allocate_scope_count_.Increment(1); |
753 } | 753 } |
754 | 754 |
755 | 755 |
756 AlwaysAllocateScope::~AlwaysAllocateScope() { | 756 AlwaysAllocateScope::~AlwaysAllocateScope() { |
757 heap_->always_allocate_scope_depth_--; | 757 heap_->always_allocate_scope_count_.Increment(-1); |
758 } | 758 } |
759 | 759 |
760 | 760 |
761 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { | 761 GCCallbacksScope::GCCallbacksScope(Heap* heap) : heap_(heap) { |
762 heap_->gc_callbacks_depth_++; | 762 heap_->gc_callbacks_depth_++; |
763 } | 763 } |
764 | 764 |
765 | 765 |
766 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } | 766 GCCallbacksScope::~GCCallbacksScope() { heap_->gc_callbacks_depth_--; } |
767 | 767 |
(...skipping 16 matching lines...) Expand all Loading... |
784 | 784 |
785 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 785 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
786 for (Object** current = start; current < end; current++) { | 786 for (Object** current = start; current < end; current++) { |
787 CHECK((*current)->IsSmi()); | 787 CHECK((*current)->IsSmi()); |
788 } | 788 } |
789 } | 789 } |
790 } | 790 } |
791 } // namespace v8::internal | 791 } // namespace v8::internal |
792 | 792 |
793 #endif // V8_HEAP_HEAP_INL_H_ | 793 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |