| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 } | 805 } |
| 806 | 806 |
| 807 int Heap::GetNextTemplateSerialNumber() { | 807 int Heap::GetNextTemplateSerialNumber() { |
| 808 int next_serial_number = next_template_serial_number()->value() + 1; | 808 int next_serial_number = next_template_serial_number()->value() + 1; |
| 809 set_next_template_serial_number(Smi::FromInt(next_serial_number)); | 809 set_next_template_serial_number(Smi::FromInt(next_serial_number)); |
| 810 return next_serial_number; | 810 return next_serial_number; |
| 811 } | 811 } |
| 812 | 812 |
| 813 void Heap::SetSerializedTemplates(FixedArray* templates) { | 813 void Heap::SetSerializedTemplates(FixedArray* templates) { |
| 814 DCHECK_EQ(empty_fixed_array(), serialized_templates()); | 814 DCHECK_EQ(empty_fixed_array(), serialized_templates()); |
| 815 DCHECK(isolate()->serializer_enabled()); |
| 815 set_serialized_templates(templates); | 816 set_serialized_templates(templates); |
| 816 } | 817 } |
| 817 | 818 |
| 819 void Heap::SetSerializedGlobalProxySizes(FixedArray* sizes) { |
| 820 DCHECK_EQ(empty_fixed_array(), serialized_global_proxy_sizes()); |
| 821 DCHECK(isolate()->serializer_enabled()); |
| 822 set_serialized_global_proxy_sizes(sizes); |
| 823 } |
| 824 |
| 818 void Heap::CreateObjectStats() { | 825 void Heap::CreateObjectStats() { |
| 819 if (V8_LIKELY(FLAG_gc_stats == 0)) return; | 826 if (V8_LIKELY(FLAG_gc_stats == 0)) return; |
| 820 if (!live_object_stats_) { | 827 if (!live_object_stats_) { |
| 821 live_object_stats_ = new ObjectStats(this); | 828 live_object_stats_ = new ObjectStats(this); |
| 822 } | 829 } |
| 823 if (!dead_object_stats_) { | 830 if (!dead_object_stats_) { |
| 824 dead_object_stats_ = new ObjectStats(this); | 831 dead_object_stats_ = new ObjectStats(this); |
| 825 } | 832 } |
| 826 } | 833 } |
| 827 | 834 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 849 | 856 |
| 850 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 857 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
| 851 for (Object** current = start; current < end; current++) { | 858 for (Object** current = start; current < end; current++) { |
| 852 CHECK((*current)->IsSmi()); | 859 CHECK((*current)->IsSmi()); |
| 853 } | 860 } |
| 854 } | 861 } |
| 855 } // namespace internal | 862 } // namespace internal |
| 856 } // namespace v8 | 863 } // namespace v8 |
| 857 | 864 |
| 858 #endif // V8_HEAP_HEAP_INL_H_ | 865 #endif // V8_HEAP_HEAP_INL_H_ |
| OLD | NEW |