| 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/heap.h" | 9 #include "src/heap/heap.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 bool deserializing_user_code() { return deserializing_user_code_; } | 565 bool deserializing_user_code() { return deserializing_user_code_; } |
| 566 | 566 |
| 567 void DecodeReservation(Vector<const SerializedData::Reservation> res); | 567 void DecodeReservation(Vector<const SerializedData::Reservation> res); |
| 568 | 568 |
| 569 bool ReserveSpace(); | 569 bool ReserveSpace(); |
| 570 | 570 |
| 571 void UnalignedCopy(Object** dest, Object** src) { | 571 void UnalignedCopy(Object** dest, Object** src) { |
| 572 memcpy(dest, src, sizeof(*src)); | 572 memcpy(dest, src, sizeof(*src)); |
| 573 } | 573 } |
| 574 | 574 |
| 575 void SetAlignment(byte data) { |
| 576 DCHECK_EQ(kWordAligned, next_alignment_); |
| 577 int alignment = data - (kAlignmentPrefix - 1); |
| 578 DCHECK_LE(kWordAligned, alignment); |
| 579 DCHECK_LE(alignment, kSimd128Unaligned); |
| 580 next_alignment_ = static_cast<AllocationAlignment>(alignment); |
| 581 } |
| 582 |
| 575 void DeserializeDeferredObjects(); | 583 void DeserializeDeferredObjects(); |
| 576 | 584 |
| 577 void FlushICacheForNewIsolate(); | 585 void FlushICacheForNewIsolate(); |
| 578 void FlushICacheForNewCodeObjects(); | 586 void FlushICacheForNewCodeObjects(); |
| 579 | 587 |
| 580 void CommitPostProcessedObjects(Isolate* isolate); | 588 void CommitPostProcessedObjects(Isolate* isolate); |
| 581 | 589 |
| 582 // Fills in some heap data in an area from start to end (non-inclusive). The | 590 // Fills in some heap data in an area from start to end (non-inclusive). The |
| 583 // space id is used for the write barrier. The object_address is the address | 591 // space id is used for the write barrier. The object_address is the address |
| 584 // of the object we are writing into, or NULL if we are not writing into an | 592 // of the object we are writing into, or NULL if we are not writing into an |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 977 static const int kNumReservationsOffset = kFlagHashOffset + kInt32Size; | 985 static const int kNumReservationsOffset = kFlagHashOffset + kInt32Size; |
| 978 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; | 986 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; |
| 979 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; | 987 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; |
| 980 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; | 988 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; |
| 981 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; | 989 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; |
| 982 static const int kHeaderSize = kChecksum2Offset + kInt32Size; | 990 static const int kHeaderSize = kChecksum2Offset + kInt32Size; |
| 983 }; | 991 }; |
| 984 } } // namespace v8::internal | 992 } } // namespace v8::internal |
| 985 | 993 |
| 986 #endif // V8_SNAPSHOT_SERIALIZE_H_ | 994 #endif // V8_SNAPSHOT_SERIALIZE_H_ |
| OLD | NEW |