Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: src/snapshot/serialize.h

Issue 1529763002: [serializer] remove some dead code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/snapshot/natives-external.cc ('k') | src/snapshot/snapshot-source-sink.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 }; 129 };
130 130
131 131
132 // The Serializer/Deserializer class is a common superclass for Serializer and 132 // The Serializer/Deserializer class is a common superclass for Serializer and
133 // Deserializer which is used to store common constants and methods used by 133 // Deserializer which is used to store common constants and methods used by
134 // both. 134 // both.
135 class SerializerDeserializer: public ObjectVisitor { 135 class SerializerDeserializer: public ObjectVisitor {
136 public: 136 public:
137 static void Iterate(Isolate* isolate, ObjectVisitor* visitor); 137 static void Iterate(Isolate* isolate, ObjectVisitor* visitor);
138 138
139 static int nop() { return kNop; }
140
141 // No reservation for large object space necessary. 139 // No reservation for large object space necessary.
142 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1; 140 static const int kNumberOfPreallocatedSpaces = LAST_PAGED_SPACE + 1;
143 static const int kNumberOfSpaces = LAST_SPACE + 1; 141 static const int kNumberOfSpaces = LAST_SPACE + 1;
144 142
145 protected: 143 protected:
146 static bool CanBeDeferred(HeapObject* o); 144 static bool CanBeDeferred(HeapObject* o);
147 145
148 // ---------- byte code range 0x00..0x7f ---------- 146 // ---------- byte code range 0x00..0x7f ----------
149 // Byte codes in this range represent Where, HowToCode and WhereToPoint. 147 // Byte codes in this range represent Where, HowToCode and WhereToPoint.
150 // Where the pointed-to object can be found: 148 // Where the pointed-to object can be found:
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 void VisitPointers(Object** start, Object** end) override; 644 void VisitPointers(Object** start, Object** end) override;
647 645
648 // Serialize the current state of the heap. The order is: 646 // Serialize the current state of the heap. The order is:
649 // 1) Strong references. 647 // 1) Strong references.
650 // 2) Partial snapshot cache. 648 // 2) Partial snapshot cache.
651 // 3) Weak references (e.g. the string table). 649 // 3) Weak references (e.g. the string table).
652 virtual void SerializeStrongReferences(); 650 virtual void SerializeStrongReferences();
653 void SerializeObject(HeapObject* o, HowToCode how_to_code, 651 void SerializeObject(HeapObject* o, HowToCode how_to_code,
654 WhereToPoint where_to_point, int skip) override; 652 WhereToPoint where_to_point, int skip) override;
655 void SerializeWeakReferencesAndDeferred(); 653 void SerializeWeakReferencesAndDeferred();
656 void Serialize() {
657 SerializeStrongReferences();
658 SerializeWeakReferencesAndDeferred();
659 }
660 654
661 private: 655 private:
662 intptr_t root_index_wave_front_; 656 intptr_t root_index_wave_front_;
663 DISALLOW_COPY_AND_ASSIGN(StartupSerializer); 657 DISALLOW_COPY_AND_ASSIGN(StartupSerializer);
664 }; 658 };
665 659
666 660
667 class CodeSerializer : public Serializer { 661 class CodeSerializer : public Serializer {
668 public: 662 public:
669 static ScriptData* Serialize(Isolate* isolate, 663 static ScriptData* Serialize(Isolate* isolate,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size; 801 static const int kNumCodeStubKeysOffset = kNumReservationsOffset + kInt32Size;
808 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size; 802 static const int kPayloadLengthOffset = kNumCodeStubKeysOffset + kInt32Size;
809 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size; 803 static const int kChecksum1Offset = kPayloadLengthOffset + kInt32Size;
810 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size; 804 static const int kChecksum2Offset = kChecksum1Offset + kInt32Size;
811 static const int kHeaderSize = kChecksum2Offset + kInt32Size; 805 static const int kHeaderSize = kChecksum2Offset + kInt32Size;
812 }; 806 };
813 } // namespace internal 807 } // namespace internal
814 } // namespace v8 808 } // namespace v8
815 809
816 #endif // V8_SNAPSHOT_SERIALIZE_H_ 810 #endif // V8_SNAPSHOT_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/snapshot/natives-external.cc ('k') | src/snapshot/snapshot-source-sink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698