Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/heap/heap-inl.h

Issue 2076083002: [snapshot] support including templates in the snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@externalref
Patch Set: fix build Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/snapshot/partial-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698