| 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 | 645 |
| 646 // Serialize the current state of the heap. The order is: | 646 // Serialize the current state of the heap. The order is: |
| 647 // 1) Strong references. | 647 // 1) Strong references. |
| 648 // 2) Partial snapshot cache. | 648 // 2) Partial snapshot cache. |
| 649 // 3) Weak references (e.g. the string table). | 649 // 3) Weak references (e.g. the string table). |
| 650 virtual void SerializeStrongReferences(); | 650 virtual void SerializeStrongReferences(); |
| 651 void SerializeObject(HeapObject* o, HowToCode how_to_code, | 651 void SerializeObject(HeapObject* o, HowToCode how_to_code, |
| 652 WhereToPoint where_to_point, int skip) override; | 652 WhereToPoint where_to_point, int skip) override; |
| 653 void SerializeWeakReferencesAndDeferred(); | 653 void SerializeWeakReferencesAndDeferred(); |
| 654 | 654 |
| 655 void Synchronize(VisitorSynchronization::SyncTag tag) override; |
| 656 |
| 655 private: | 657 private: |
| 656 intptr_t root_index_wave_front_; | 658 intptr_t root_index_wave_front_; |
| 659 bool serializing_builtins_; |
| 657 DISALLOW_COPY_AND_ASSIGN(StartupSerializer); | 660 DISALLOW_COPY_AND_ASSIGN(StartupSerializer); |
| 658 }; | 661 }; |
| 659 | 662 |
| 660 | 663 |
| 661 class CodeSerializer : public Serializer { | 664 class CodeSerializer : public Serializer { |
| 662 public: | 665 public: |
| 663 static ScriptData* Serialize(Isolate* isolate, | 666 static ScriptData* Serialize(Isolate* isolate, |
| 664 Handle<SharedFunctionInfo> info, | 667 Handle<SharedFunctionInfo> info, |
| 665 Handle<String> source); | 668 Handle<String> source); |
| 666 | 669 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; | 804 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; |
| 802 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; | 805 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; |
| 803 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; | 806 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; |
| 804 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; | 807 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; |
| 805 static const int kHeaderSize = kChecksum2Offset + kInt32Size; | 808 static const int kHeaderSize = kChecksum2Offset + kInt32Size; |
| 806 }; | 809 }; |
| 807 } // namespace internal | 810 } // namespace internal |
| 808 } // namespace v8 | 811 } // namespace v8 |
| 809 | 812 |
| 810 #endif // V8_SNAPSHOT_SERIALIZE_H_ | 813 #endif // V8_SNAPSHOT_SERIALIZE_H_ |
| OLD | NEW |