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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 DCHECK(interpreter_entry_return_pc_offset() == Smi::FromInt(0)); | 725 DCHECK(interpreter_entry_return_pc_offset() == Smi::FromInt(0)); |
726 set_interpreter_entry_return_pc_offset(Smi::FromInt(pc_offset)); | 726 set_interpreter_entry_return_pc_offset(Smi::FromInt(pc_offset)); |
727 } | 727 } |
728 | 728 |
729 int Heap::GetNextTemplateSerialNumber() { | 729 int Heap::GetNextTemplateSerialNumber() { |
730 int next_serial_number = next_template_serial_number()->value() + 1; | 730 int next_serial_number = next_template_serial_number()->value() + 1; |
731 set_next_template_serial_number(Smi::FromInt(next_serial_number)); | 731 set_next_template_serial_number(Smi::FromInt(next_serial_number)); |
732 return next_serial_number; | 732 return next_serial_number; |
733 } | 733 } |
734 | 734 |
| 735 void Heap::SetSerializedTemplates(FixedArray* templates) { |
| 736 DCHECK_EQ(empty_fixed_array(), serialized_templates()); |
| 737 set_serialized_templates(templates); |
| 738 } |
| 739 |
735 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) | 740 AlwaysAllocateScope::AlwaysAllocateScope(Isolate* isolate) |
736 : heap_(isolate->heap()) { | 741 : heap_(isolate->heap()) { |
737 heap_->always_allocate_scope_count_.Increment(1); | 742 heap_->always_allocate_scope_count_.Increment(1); |
738 } | 743 } |
739 | 744 |
740 | 745 |
741 AlwaysAllocateScope::~AlwaysAllocateScope() { | 746 AlwaysAllocateScope::~AlwaysAllocateScope() { |
742 heap_->always_allocate_scope_count_.Increment(-1); | 747 heap_->always_allocate_scope_count_.Increment(-1); |
743 } | 748 } |
744 | 749 |
(...skipping 11 matching lines...) Expand all Loading... |
756 | 761 |
757 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 762 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
758 for (Object** current = start; current < end; current++) { | 763 for (Object** current = start; current < end; current++) { |
759 CHECK((*current)->IsSmi()); | 764 CHECK((*current)->IsSmi()); |
760 } | 765 } |
761 } | 766 } |
762 } // namespace internal | 767 } // namespace internal |
763 } // namespace v8 | 768 } // namespace v8 |
764 | 769 |
765 #endif // V8_HEAP_HEAP_INL_H_ | 770 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |