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

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

Issue 2585693002: [serializer] allocate global proxy with the expected size. (Closed)
Patch Set: Created 4 years 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') | test/cctest/test-serialize.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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698