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

Unified Diff: src/serialize.h

Issue 1005183006: Serializer: serialize internal references via object visitor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: platform ports Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/serialize.cc » ('j') | src/serialize.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index ca748a7e339aa2fd8f8d916e589e1ac8d72e4b9f..f50d04d3d6b390b6eca98810a4e55be4bbb37bbb 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -307,7 +307,7 @@ class SerializerDeserializer: public ObjectVisitor {
enum Where {
kNewObject = 0, // Object is next in snapshot.
// 1-7 One per space.
- // 0x8 Unused.
+ // 0x8 Used by misc. See below.
kRootArray = 0x9, // Object is found in root array.
kPartialSnapshotCache = 0xa, // Object is in the cache.
kExternalReference = 0xb, // Pointer to an external reference.
@@ -346,6 +346,9 @@ class SerializerDeserializer: public ObjectVisitor {
};
// Misc.
+
+ // 0x48, 0x88 and 0xc8 are unused.
+
// Raw data to be copied from the snapshot. This byte code does not advance
// the current pointer, which is used for code objects, where we write the
// entire code in one memcpy, then fix up stuff with kSkip and other byte
@@ -355,6 +358,9 @@ class SerializerDeserializer: public ObjectVisitor {
// These autoadvance the current pointer.
static const int kOnePointerRawData = 0x21;
+ // Internal reference encoded as offsets of pc and target from code entry.
+ static const int kInternalReference = 0x08;
+
static const int kVariableRepeat = 0x60;
// 0x61-0x6f Repeat last word
static const int kFixedRepeat = 0x61;
@@ -626,6 +632,7 @@ class Serializer : public SerializerDeserializer {
void VisitEmbeddedPointer(RelocInfo* target);
void VisitExternalReference(Address* p);
void VisitExternalReference(RelocInfo* rinfo);
+ void VisitInternalReference(RelocInfo* rinfo);
void VisitCodeTarget(RelocInfo* target);
void VisitCodeEntry(Address entry_address);
void VisitCell(RelocInfo* rinfo);
« no previous file with comments | « src/objects.h ('k') | src/serialize.cc » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698