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

Side by Side Diff: src/snapshot/serializer-common.h

Issue 2229583003: [serializer] reserve maps one by one to avoid fragmentation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix build Created 4 years, 4 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/snapshot/serializer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_SNAPSHOT_SERIALIZER_COMMON_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZER_COMMON_H_
6 #define V8_SNAPSHOT_SERIALIZER_COMMON_H_ 6 #define V8_SNAPSHOT_SERIALIZER_COMMON_H_
7 7
8 #include "src/address-map.h" 8 #include "src/address-map.h"
9 #include "src/external-reference-table.h" 9 #include "src/external-reference-table.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 }; 73 };
74 74
75 // The Serializer/Deserializer class is a common superclass for Serializer and 75 // The Serializer/Deserializer class is a common superclass for Serializer and
76 // Deserializer which is used to store common constants and methods used by 76 // Deserializer which is used to store common constants and methods used by
77 // both. 77 // both.
78 class SerializerDeserializer : public ObjectVisitor { 78 class SerializerDeserializer : public ObjectVisitor {
79 public: 79 public:
80 static void Iterate(Isolate* isolate, ObjectVisitor* visitor); 80 static void Iterate(Isolate* isolate, ObjectVisitor* visitor);
81 81
82 // No reservation for large object space necessary. 82 // No reservation for large object space necessary.
83 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1; 83 // We also handle map space differenly.
84 STATIC_ASSERT(MAP_SPACE == CODE_SPACE + 1);
85 static const int kNumberOfPreallocatedSpaces = CODE_SPACE + 1;
84 static const int kNumberOfSpaces = LAST_SPACE + 1; 86 static const int kNumberOfSpaces = LAST_SPACE + 1;
85 87
86 protected: 88 protected:
87 static bool CanBeDeferred(HeapObject* o); 89 static bool CanBeDeferred(HeapObject* o);
88 90
89 // ---------- byte code range 0x00..0x7f ---------- 91 // ---------- byte code range 0x00..0x7f ----------
90 // Byte codes in this range represent Where, HowToCode and WhereToPoint. 92 // Byte codes in this range represent Where, HowToCode and WhereToPoint.
91 // Where the pointed-to object can be found: 93 // Where the pointed-to object can be found:
92 // The static assert below will trigger when the number of preallocated spaces 94 // The static assert below will trigger when the number of preallocated spaces
93 // changed. If that happens, update the bytecode ranges in the comments below. 95 // changed. If that happens, update the bytecode ranges in the comments below.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 278
277 byte* data_; 279 byte* data_;
278 int size_; 280 int size_;
279 bool owns_data_; 281 bool owns_data_;
280 }; 282 };
281 283
282 } // namespace internal 284 } // namespace internal
283 } // namespace v8 285 } // namespace v8
284 286
285 #endif // V8_SNAPSHOT_SERIALIZER_COMMON_H_ 287 #endif // V8_SNAPSHOT_SERIALIZER_COMMON_H_
OLDNEW
« no previous file with comments | « src/snapshot/serializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698