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

Side by Side Diff: src/objects.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/mark-compact.cc ('k') | src/objects.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 7792 matching lines...) Expand 10 before | Expand all | Expand 10 after
7803 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); } 7803 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); }
7804 7804
7805 // Visit pointer embedded into a code object. 7805 // Visit pointer embedded into a code object.
7806 virtual void VisitEmbeddedPointer(RelocInfo* rinfo); 7806 virtual void VisitEmbeddedPointer(RelocInfo* rinfo);
7807 7807
7808 // Visits a contiguous arrays of external references (references to the C++ 7808 // Visits a contiguous arrays of external references (references to the C++
7809 // heap) in the half-open range [start, end). Any or all of the values 7809 // heap) in the half-open range [start, end). Any or all of the values
7810 // may be modified on return. 7810 // may be modified on return.
7811 virtual void VisitExternalReferences(Address* start, Address* end) {} 7811 virtual void VisitExternalReferences(Address* start, Address* end) {}
7812 7812
7813 virtual void VisitExternalReference(RelocInfo* rinfo);
7814
7813 inline void VisitExternalReference(Address* p) { 7815 inline void VisitExternalReference(Address* p) {
7814 VisitExternalReferences(p, p + 1); 7816 VisitExternalReferences(p, p + 1);
7815 } 7817 }
7816 7818
7817 // Visits a handle that has an embedder-assigned class ID. 7819 // Visits a handle that has an embedder-assigned class ID.
7818 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {} 7820 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {}
7819 7821
7820 #ifdef DEBUG 7822 #ifdef DEBUG
7821 // Intended for serialization/deserialization checking: insert, or 7823 // Intended for serialization/deserialization checking: insert, or
7822 // check for the presence of, a tag at this position in the stream. 7824 // check for the presence of, a tag at this position in the stream.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
7858 } else { 7860 } else {
7859 value &= ~(1 << bit_position); 7861 value &= ~(1 << bit_position);
7860 } 7862 }
7861 return value; 7863 return value;
7862 } 7864 }
7863 }; 7865 };
7864 7866
7865 } } // namespace v8::internal 7867 } } // namespace v8::internal
7866 7868
7867 #endif // V8_OBJECTS_H_ 7869 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698