Chromium Code Reviews| 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); | |
|
Yang
2017/02/14 21:32:00
please do not remove this check, but rather change
bbudge
2017/02/14 22:18:51
Good catch. Put it back.
| |
| 88 next_alignment_ = static_cast<AllocationAlignment>(alignment); | 87 next_alignment_ = static_cast<AllocationAlignment>(alignment); |
| 89 } | 88 } |
| 90 | 89 |
| 91 void DeserializeDeferredObjects(); | 90 void DeserializeDeferredObjects(); |
| 92 void DeserializeInternalFields( | 91 void DeserializeInternalFields( |
| 93 v8::DeserializeInternalFieldsCallback internal_fields_deserializer); | 92 v8::DeserializeInternalFieldsCallback internal_fields_deserializer); |
| 94 | 93 |
| 95 void FlushICacheForNewIsolate(); | 94 void FlushICacheForNewIsolate(); |
| 96 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects(); | 95 void FlushICacheForNewCodeObjectsAndRecordEmbeddedObjects(); |
| 97 | 96 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 | 147 |
| 149 AllocationAlignment next_alignment_; | 148 AllocationAlignment next_alignment_; |
| 150 | 149 |
| 151 DISALLOW_COPY_AND_ASSIGN(Deserializer); | 150 DISALLOW_COPY_AND_ASSIGN(Deserializer); |
| 152 }; | 151 }; |
| 153 | 152 |
| 154 } // namespace internal | 153 } // namespace internal |
| 155 } // namespace v8 | 154 } // namespace v8 |
| 156 | 155 |
| 157 #endif // V8_SNAPSHOT_DESERIALIZER_H_ | 156 #endif // V8_SNAPSHOT_DESERIALIZER_H_ |
| OLD | NEW |