OLD | NEW |
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_DESERIALIZER_H_ | 5 #ifndef V8_SNAPSHOT_DESERIALIZER_H_ |
6 #define V8_SNAPSHOT_DESERIALIZER_H_ | 6 #define V8_SNAPSHOT_DESERIALIZER_H_ |
7 | 7 |
8 #include "src/heap/heap.h" | 8 #include "src/heap/heap.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/snapshot/serializer-common.h" | 10 #include "src/snapshot/serializer-common.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 bool ReserveSpace(); | 77 bool ReserveSpace(); |
78 | 78 |
79 void UnalignedCopy(Object** dest, Object** src) { | 79 void UnalignedCopy(Object** dest, Object** src) { |
80 memcpy(dest, src, sizeof(*src)); | 80 memcpy(dest, src, sizeof(*src)); |
81 } | 81 } |
82 | 82 |
83 void SetAlignment(byte data) { | 83 void SetAlignment(byte data) { |
84 DCHECK_EQ(kWordAligned, next_alignment_); | 84 DCHECK_EQ(kWordAligned, next_alignment_); |
85 int alignment = data - (kAlignmentPrefix - 1); | 85 int alignment = data - (kAlignmentPrefix - 1); |
86 DCHECK_LE(kWordAligned, alignment); | 86 DCHECK_LE(kWordAligned, alignment); |
87 DCHECK_LE(alignment, kSimd128Unaligned); | 87 DCHECK_LE(alignment, kDoubleUnaligned); |
88 next_alignment_ = static_cast<AllocationAlignment>(alignment); | 88 next_alignment_ = static_cast<AllocationAlignment>(alignment); |
89 } | 89 } |
90 | 90 |
91 void DeserializeDeferredObjects(); | 91 void DeserializeDeferredObjects(); |
92 void DeserializeInternalFields( | 92 void DeserializeInternalFields( |
93 v8::DeserializeInternalFieldsCallback internal_fields_deserializer); | 93 v8::DeserializeInternalFieldsCallback internal_fields_deserializer); |
94 | 94 |
95 void FlushICacheForNewIsolate(); | 95 void FlushICacheForNewIsolate(); |
96 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects(); | 96 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects(); |
97 | 97 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 AllocationAlignment next_alignment_; | 149 AllocationAlignment next_alignment_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(Deserializer); | 151 DISALLOW_COPY_AND_ASSIGN(Deserializer); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace internal | 154 } // namespace internal |
155 } // namespace v8 | 155 } // namespace v8 |
156 | 156 |
157 #endif // V8_SNAPSHOT_DESERIALIZER_H_ | 157 #endif // V8_SNAPSHOT_DESERIALIZER_H_ |
OLD | NEW |