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/address-map.h" | 8 #include "src/address-map.h" |
9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 bool deserializing_user_code() { return deserializing_user_code_; } | 396 bool deserializing_user_code() { return deserializing_user_code_; } |
397 | 397 |
398 void DecodeReservation(Vector<const SerializedData::Reservation> res); | 398 void DecodeReservation(Vector<const SerializedData::Reservation> res); |
399 | 399 |
400 bool ReserveSpace(); | 400 bool ReserveSpace(); |
401 | 401 |
402 void UnalignedCopy(Object** dest, Object** src) { | 402 void UnalignedCopy(Object** dest, Object** src) { |
403 memcpy(dest, src, sizeof(*src)); | 403 memcpy(dest, src, sizeof(*src)); |
404 } | 404 } |
405 | 405 |
| 406 void SetAlignment(byte data) { |
| 407 DCHECK_EQ(kWordAligned, next_alignment_); |
| 408 int alignment = data - (kAlignmentPrefix - 1); |
| 409 DCHECK_LE(kWordAligned, alignment); |
| 410 DCHECK_LE(alignment, kSimd128Unaligned); |
| 411 next_alignment_ = static_cast<AllocationAlignment>(alignment); |
| 412 } |
| 413 |
406 void DeserializeDeferredObjects(); | 414 void DeserializeDeferredObjects(); |
407 | 415 |
408 void FlushICacheForNewIsolate(); | 416 void FlushICacheForNewIsolate(); |
409 void FlushICacheForNewCodeObjects(); | 417 void FlushICacheForNewCodeObjects(); |
410 | 418 |
411 void CommitPostProcessedObjects(Isolate* isolate); | 419 void CommitPostProcessedObjects(Isolate* isolate); |
412 | 420 |
413 // Fills in some heap data in an area from start to end (non-inclusive). The | 421 // Fills in some heap data in an area from start to end (non-inclusive). The |
414 // space id is used for the write barrier. The object_address is the address | 422 // space id is used for the write barrier. The object_address is the address |
415 // of the object we are writing into, or NULL if we are not writing into an | 423 // of the object we are writing into, or NULL if we are not writing into an |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; | 815 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; |
808 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; | 816 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; |
809 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; | 817 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; |
810 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; | 818 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; |
811 static const int kHeaderSize = kChecksum2Offset + kInt32Size; | 819 static const int kHeaderSize = kChecksum2Offset + kInt32Size; |
812 }; | 820 }; |
813 } // namespace internal | 821 } // namespace internal |
814 } // namespace v8 | 822 } // namespace v8 |
815 | 823 |
816 #endif // V8_SNAPSHOT_SERIALIZE_H_ | 824 #endif // V8_SNAPSHOT_SERIALIZE_H_ |
OLD | NEW |