| 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_SNAPSHOT_SERIALIZE_H_ | 5 #ifndef V8_SNAPSHOT_SERIALIZE_H_ |
| 6 #define V8_SNAPSHOT_SERIALIZE_H_ | 6 #define V8_SNAPSHOT_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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 static void Iterate(Isolate* isolate, ObjectVisitor* visitor); | 300 static void Iterate(Isolate* isolate, ObjectVisitor* visitor); |
| 301 | 301 |
| 302 static int nop() { return kNop; } | 302 static int nop() { return kNop; } |
| 303 | 303 |
| 304 // No reservation for large object space necessary. | 304 // No reservation for large object space necessary. |
| 305 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1; | 305 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1; |
| 306 static const int kNumberOfSpaces = LAST_SPACE + 1; | 306 static const int kNumberOfSpaces = LAST_SPACE + 1; |
| 307 | 307 |
| 308 protected: | 308 protected: |
| 309 static bool CanBeDeferred(HeapObject* o) { | 309 static bool CanBeDeferred(HeapObject* o) { |
| 310 return !o->IsString() && !o->IsScript(); | 310 return !o->IsInternalizedString() && !o->IsScript(); |
| 311 } | 311 } |
| 312 | 312 |
| 313 // ---------- byte code range 0x00..0x7f ---------- | 313 // ---------- byte code range 0x00..0x7f ---------- |
| 314 // Byte codes in this range represent Where, HowToCode and WhereToPoint. | 314 // Byte codes in this range represent Where, HowToCode and WhereToPoint. |
| 315 // Where the pointed-to object can be found: | 315 // Where the pointed-to object can be found: |
| 316 // The static assert below will trigger when the number of preallocated spaces | 316 // The static assert below will trigger when the number of preallocated spaces |
| 317 // changed. If that happens, update the bytecode ranges in the comments below. | 317 // changed. If that happens, update the bytecode ranges in the comments below. |
| 318 STATIC_ASSERT(5 == kNumberOfSpaces); | 318 STATIC_ASSERT(5 == kNumberOfSpaces); |
| 319 enum Where { | 319 enum Where { |
| 320 // 0x00..0x04 Allocate new object, in specified space. | 320 // 0x00..0x04 Allocate new object, in specified space. |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 kNumInternalizedStringsOffset + kInt32Size; | 1030 kNumInternalizedStringsOffset + kInt32Size; |
| 1031 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; | 1031 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; |
| 1032 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; | 1032 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; |
| 1033 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; | 1033 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; |
| 1034 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; | 1034 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; |
| 1035 static const int kHeaderSize = kChecksum2Offset + kInt32Size; | 1035 static const int kHeaderSize = kChecksum2Offset + kInt32Size; |
| 1036 }; | 1036 }; |
| 1037 } } // namespace v8::internal | 1037 } } // namespace v8::internal |
| 1038 | 1038 |
| 1039 #endif // V8_SNAPSHOT_SERIALIZE_H_ | 1039 #endif // V8_SNAPSHOT_SERIALIZE_H_ |
| OLD | NEW |