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

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

Issue 2810653002: Add a host parameter to ObjectVisitor methods. (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/s390/assembler-s390-inl.h ('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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 : serializer_(serializer), 275 : serializer_(serializer),
276 object_(obj), 276 object_(obj),
277 sink_(sink), 277 sink_(sink),
278 reference_representation_(how_to_code + where_to_point), 278 reference_representation_(how_to_code + where_to_point),
279 bytes_processed_so_far_(0), 279 bytes_processed_so_far_(0),
280 code_has_been_output_(false) {} 280 code_has_been_output_(false) {}
281 ~ObjectSerializer() override {} 281 ~ObjectSerializer() override {}
282 void Serialize(); 282 void Serialize();
283 void SerializeContent(); 283 void SerializeContent();
284 void SerializeDeferred(); 284 void SerializeDeferred();
285 void VisitPointers(Object** start, Object** end) override; 285 void VisitPointers(HeapObject* host, Object** start, Object** end) override;
286 void VisitEmbeddedPointer(RelocInfo* target) override; 286 void VisitEmbeddedPointer(Code* host, RelocInfo* target) override;
287 void VisitExternalReference(Address* p) override; 287 void VisitExternalReference(Foreign* host, Address* p) override;
288 void VisitExternalReference(RelocInfo* rinfo) override; 288 void VisitExternalReference(Code* host, RelocInfo* rinfo) override;
289 void VisitInternalReference(RelocInfo* rinfo) override; 289 void VisitInternalReference(Code* host, RelocInfo* rinfo) override;
290 void VisitCodeTarget(RelocInfo* target) override; 290 void VisitCodeTarget(Code* host, RelocInfo* target) override;
291 void VisitCodeEntry(Address entry_address) override; 291 void VisitCodeEntry(JSFunction* host, Address entry_address) override;
292 void VisitCell(RelocInfo* rinfo) override; 292 void VisitCellPointer(Code* host, RelocInfo* rinfo) override;
293 void VisitRuntimeEntry(RelocInfo* reloc) override; 293 void VisitRuntimeEntry(Code* host, RelocInfo* reloc) override;
294 294
295 private: 295 private:
296 bool TryEncodeDeoptimizationEntry(HowToCode how_to_code, Address target, 296 bool TryEncodeDeoptimizationEntry(HowToCode how_to_code, Address target,
297 int skip); 297 int skip);
298 void SerializePrologue(AllocationSpace space, int size, Map* map); 298 void SerializePrologue(AllocationSpace space, int size, Map* map);
299 299
300 300
301 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn }; 301 enum ReturnSkip { kCanReturnSkipInsteadOfSkipping, kIgnoringReturn };
302 // This function outputs or skips the raw data between the last pointer and 302 // This function outputs or skips the raw data between the last pointer and
303 // up to the current position. It optionally can just return the number of 303 // up to the current position. It optionally can just return the number of
(...skipping 10 matching lines...) Expand all
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/s390/assembler-s390-inl.h ('k') | src/snapshot/serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698