| 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_SERIALIZE_H_ | 5 #ifndef V8_SERIALIZE_H_ |
| 6 #define V8_SERIALIZE_H_ | 6 #define V8_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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 WhereToPoint where_to_point, int skip) OVERRIDE; | 767 WhereToPoint where_to_point, int skip) OVERRIDE; |
| 768 | 768 |
| 769 private: | 769 private: |
| 770 int PartialSnapshotCacheIndex(HeapObject* o); | 770 int PartialSnapshotCacheIndex(HeapObject* o); |
| 771 bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { | 771 bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { |
| 772 // Scripts should be referred only through shared function infos. We can't | 772 // Scripts should be referred only through shared function infos. We can't |
| 773 // allow them to be part of the partial snapshot because they contain a | 773 // allow them to be part of the partial snapshot because they contain a |
| 774 // unique ID, and deserializing several partial snapshots containing script | 774 // unique ID, and deserializing several partial snapshots containing script |
| 775 // would cause dupes. | 775 // would cause dupes. |
| 776 DCHECK(!o->IsScript()); | 776 DCHECK(!o->IsScript()); |
| 777 return o->IsName() || o->IsSharedFunctionInfo() || | 777 return o->IsName() || o->IsSharedFunctionInfo() || o->IsHeapNumber() || |
| 778 o->IsHeapNumber() || o->IsCode() || | 778 o->IsCode() || o->IsScopeInfo() || o->IsExecutableAccessorInfo() || |
| 779 o->IsScopeInfo() || | |
| 780 o->map() == | 779 o->map() == |
| 781 startup_serializer_->isolate()->heap()->fixed_cow_array_map(); | 780 startup_serializer_->isolate()->heap()->fixed_cow_array_map(); |
| 782 } | 781 } |
| 783 | 782 |
| 784 void SerializeOutdatedContextsAsFixedArray(); | 783 void SerializeOutdatedContextsAsFixedArray(); |
| 785 | 784 |
| 786 Serializer* startup_serializer_; | 785 Serializer* startup_serializer_; |
| 787 List<BackReference> outdated_contexts_; | 786 List<BackReference> outdated_contexts_; |
| 788 Object* global_object_; | 787 Object* global_object_; |
| 789 PartialCacheIndexMap partial_cache_index_map_; | 788 PartialCacheIndexMap partial_cache_index_map_; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 kNumInternalizedStringsOffset + kInt32Size; | 977 kNumInternalizedStringsOffset + kInt32Size; |
| 979 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; | 978 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; |
| 980 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; | 979 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; |
| 981 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; | 980 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; |
| 982 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; | 981 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; |
| 983 static const int kHeaderSize = kChecksum2Offset + kInt32Size; | 982 static const int kHeaderSize = kChecksum2Offset + kInt32Size; |
| 984 }; | 983 }; |
| 985 } } // namespace v8::internal | 984 } } // namespace v8::internal |
| 986 | 985 |
| 987 #endif // V8_SERIALIZE_H_ | 986 #endif // V8_SERIALIZE_H_ |
| OLD | NEW |