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

Side by Side Diff: src/serialize.h

Issue 8467010: Refactor embedded pointer visitors for the serializer (Closed)
Patch Set: Rebased on r9943, updated based on code review comments Created 9 years, 1 month 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/objects.cc ('k') | src/serialize.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 SnapshotByteSink* sink, 507 SnapshotByteSink* sink,
508 HowToCode how_to_code, 508 HowToCode how_to_code,
509 WhereToPoint where_to_point) 509 WhereToPoint where_to_point)
510 : serializer_(serializer), 510 : serializer_(serializer),
511 object_(HeapObject::cast(o)), 511 object_(HeapObject::cast(o)),
512 sink_(sink), 512 sink_(sink),
513 reference_representation_(how_to_code + where_to_point), 513 reference_representation_(how_to_code + where_to_point),
514 bytes_processed_so_far_(0) { } 514 bytes_processed_so_far_(0) { }
515 void Serialize(); 515 void Serialize();
516 void VisitPointers(Object** start, Object** end); 516 void VisitPointers(Object** start, Object** end);
517 void VisitEmbeddedPointer(RelocInfo* target);
517 void VisitExternalReferences(Address* start, Address* end); 518 void VisitExternalReferences(Address* start, Address* end);
519 void VisitExternalReference(RelocInfo* rinfo);
518 void VisitCodeTarget(RelocInfo* target); 520 void VisitCodeTarget(RelocInfo* target);
519 void VisitCodeEntry(Address entry_address); 521 void VisitCodeEntry(Address entry_address);
520 void VisitGlobalPropertyCell(RelocInfo* rinfo); 522 void VisitGlobalPropertyCell(RelocInfo* rinfo);
521 void VisitRuntimeEntry(RelocInfo* reloc); 523 void VisitRuntimeEntry(RelocInfo* reloc);
522 // Used for seralizing the external strings that hold the natives source. 524 // Used for seralizing the external strings that hold the natives source.
523 void VisitExternalAsciiString( 525 void VisitExternalAsciiString(
524 v8::String::ExternalAsciiStringResource** resource); 526 v8::String::ExternalAsciiStringResource** resource);
525 // We can't serialize a heap with external two byte strings. 527 // We can't serialize a heap with external two byte strings.
526 void VisitExternalTwoByteString( 528 void VisitExternalTwoByteString(
527 v8::String::ExternalStringResource** resource) { 529 v8::String::ExternalStringResource** resource) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 private: 646 private:
645 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) { 647 virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
646 return false; 648 return false;
647 } 649 }
648 }; 650 };
649 651
650 652
651 } } // namespace v8::internal 653 } } // namespace v8::internal
652 654
653 #endif // V8_SERIALIZE_H_ 655 #endif // V8_SERIALIZE_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698