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

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

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 7 months 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/partial-serializer.cc ('k') | src/snapshot/serializer.cc » ('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 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_SERIALIZER_H_ 5 #ifndef V8_SNAPSHOT_SERIALIZER_H_
6 #define V8_SNAPSHOT_SERIALIZER_H_ 6 #define V8_SNAPSHOT_SERIALIZER_H_
7 7
8 #include "src/isolate.h" 8 #include "src/isolate.h"
9 #include "src/log.h" 9 #include "src/log.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 } 149 }
150 150
151 private: 151 private:
152 static const int kMaxRecursionDepth = 32; 152 static const int kMaxRecursionDepth = 32;
153 Serializer* serializer_; 153 Serializer* serializer_;
154 }; 154 };
155 155
156 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code, 156 virtual void SerializeObject(HeapObject* o, HowToCode how_to_code,
157 WhereToPoint where_to_point, int skip) = 0; 157 WhereToPoint where_to_point, int skip) = 0;
158 158
159 void VisitPointers(Object** start, Object** end) override; 159 void VisitRootPointers(Root root, Object** start, Object** end) override;
160 160
161 void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where, 161 void PutRoot(int index, HeapObject* object, HowToCode how, WhereToPoint where,
162 int skip); 162 int skip);
163 163
164 void PutSmi(Smi* smi); 164 void PutSmi(Smi* smi);
165 165
166 void PutBackReference(HeapObject* object, SerializerReference reference); 166 void PutBackReference(HeapObject* object, SerializerReference reference);
167 167
168 void PutAttachedReference(SerializerReference reference, 168 void PutAttachedReference(SerializerReference reference,
169 HowToCode how_to_code, WhereToPoint where_to_point); 169 HowToCode how_to_code, WhereToPoint where_to_point);
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 SnapshotByteSink* sink_; 314 SnapshotByteSink* sink_;
315 int reference_representation_; 315 int reference_representation_;
316 int bytes_processed_so_far_; 316 int bytes_processed_so_far_;
317 bool code_has_been_output_; 317 bool code_has_been_output_;
318 }; 318 };
319 319
320 } // namespace internal 320 } // namespace internal
321 } // namespace v8 321 } // namespace v8
322 322
323 #endif // V8_SNAPSHOT_SERIALIZER_H_ 323 #endif // V8_SNAPSHOT_SERIALIZER_H_
OLDNEW
« no previous file with comments | « src/snapshot/partial-serializer.cc ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698