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

Side by Side Diff: src/snapshot/serialize.h

Issue 1010803012: Merge cellspace into old pointer space (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/objects-inl.h ('k') | src/snapshot/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_SERIALIZE_H_ 5 #ifndef V8_SERIALIZE_H_
6 #define V8_SERIALIZE_H_ 6 #define V8_SERIALIZE_H_
7 7
8 #include "src/hashmap.h" 8 #include "src/hashmap.h"
9 #include "src/heap-profiler.h" 9 #include "src/heap-profiler.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // The Serializer/Deserializer class is a common superclass for Serializer and 292 // The Serializer/Deserializer class is a common superclass for Serializer and
293 // Deserializer which is used to store common constants and methods used by 293 // Deserializer which is used to store common constants and methods used by
294 // both. 294 // both.
295 class SerializerDeserializer: public ObjectVisitor { 295 class SerializerDeserializer: public ObjectVisitor {
296 public: 296 public:
297 static void Iterate(Isolate* isolate, ObjectVisitor* visitor); 297 static void Iterate(Isolate* isolate, ObjectVisitor* visitor);
298 298
299 static int nop() { return kNop; } 299 static int nop() { return kNop; }
300 300
301 // No reservation for large object space necessary. 301 // No reservation for large object space necessary.
302 static const int kNumberOfPreallocatedSpaces = LO_SPACE; 302 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1;
303 static const int kNumberOfSpaces = LAST_SPACE + 1; 303 static const int kNumberOfSpaces = LAST_SPACE + 1;
304 304
305 protected: 305 protected:
306 // ---------- byte code range 0x00..0x7f ---------- 306 // ---------- byte code range 0x00..0x7f ----------
307 // Byte codes in this range represent Where, HowToCode and WhereToPoint. 307 // Byte codes in this range represent Where, HowToCode and WhereToPoint.
308 // Where the pointed-to object can be found: 308 // Where the pointed-to object can be found:
309 // The static assert below will trigger when the number of preallocated spaces
310 // changed. If that happens, update the bytecode ranges in the comments below.
311 STATIC_ASSERT(5 == kNumberOfSpaces);
309 enum Where { 312 enum Where {
310 // 0x00..0x05 Allocate new object, in specified space. 313 // 0x00..0x04 Allocate new object, in specified space.
311 kNewObject = 0, 314 kNewObject = 0,
315 // 0x05 Unused (including 0x25, 0x45, 0x65).
312 // 0x06 Unused (including 0x26, 0x46, 0x66). 316 // 0x06 Unused (including 0x26, 0x46, 0x66).
313 // 0x07 Unused (including 0x27, 0x47, 0x67). 317 // 0x07 Unused (including 0x27, 0x47, 0x67).
314 // 0x08..0x0d Reference to previous object from space. 318 // 0x08..0x0c Reference to previous object from space.
315 kBackref = 0x08, 319 kBackref = 0x08,
316 // 0x0e Unused (including 0x2e, 0x4e, 0x6e). 320 // 0x0e Unused (including 0x2e, 0x4e, 0x6e).
317 // 0x0f Unused (including 0x2f, 0x4f, 0x6f). 321 // 0x0f Unused (including 0x2f, 0x4f, 0x6f).
318 // 0x10..0x15 Reference to previous object from space after skip. 322 // 0x10..0x14 Reference to previous object from space after skip.
319 kBackrefWithSkip = 0x10, 323 kBackrefWithSkip = 0x10,
320 // 0x16 Unused (including 0x36, 0x56, 0x76). 324 // 0x16 Unused (including 0x36, 0x56, 0x76).
321 // 0x17 Unused (including 0x37, 0x57, 0x77). 325 // 0x17 Unused (including 0x37, 0x57, 0x77).
322 // 0x18 Root array item. 326 // 0x18 Root array item.
323 kRootArray = 0x18, 327 kRootArray = 0x18,
324 // 0x19 Object in the partial snapshot cache. 328 // 0x19 Object in the partial snapshot cache.
325 kPartialSnapshotCache = 0x19, 329 kPartialSnapshotCache = 0x19,
326 // 0x1a External reference referenced by id. 330 // 0x1a External reference referenced by id.
327 kExternalReference = 0x1a, 331 kExternalReference = 0x1a,
328 // 0x1b Object provided in the attached list. 332 // 0x1b Object provided in the attached list.
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 kNumInternalizedStringsOffset + kInt32Size; 975 kNumInternalizedStringsOffset + kInt32Size;
972 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; 976 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size;
973 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; 977 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
974 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; 978 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
975 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; 979 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
976 static const int kHeaderSize = kChecksum2Offset + kInt32Size; 980 static const int kHeaderSize = kChecksum2Offset + kInt32Size;
977 }; 981 };
978 } } // namespace v8::internal 982 } } // namespace v8::internal
979 983
980 #endif // V8_SERIALIZE_H_ 984 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698