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

Unified Diff: src/serialize.h

Issue 383173002: Serialize builtins by referencing canonical ones. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 | « no previous file | src/serialize.cc » ('j') | no next file with comments »
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 72bcfe52f80054407baaaefa96a4fabbb227b9fa..65ca34e330b72796d2545dc40e05a570fb4bbd16 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -148,17 +148,18 @@ class SerializerDeserializer: public ObjectVisitor {
protected:
// Where the pointed-to object can be found:
enum Where {
- kNewObject = 0, // Object is next in snapshot.
+ kNewObject = 0, // Object is next in snapshot.
// 1-6 One per space.
- kRootArray = 0x9, // Object is found in root array.
- kPartialSnapshotCache = 0xa, // Object is in the cache.
- kExternalReference = 0xb, // Pointer to an external reference.
- kSkip = 0xc, // Skip n bytes.
- kNop = 0xd, // Does nothing, used to pad.
- // 0xe-0xf Free.
- kBackref = 0x10, // Object is described relative to end.
+ kRootArray = 0x9, // Object is found in root array.
+ kPartialSnapshotCache = 0xa, // Object is in the cache.
+ kExternalReference = 0xb, // Pointer to an external reference.
+ kSkip = 0xc, // Skip n bytes.
+ kBuiltin = 0xd, // Builtin code object.
+ // 0xe Free.
+ kNop = 0xf, // Does nothing, used to pad.
+ kBackref = 0x10, // Object is described relative to end.
// 0x11-0x16 One per space.
- kBackrefWithSkip = 0x18, // Object is described relative to end.
+ kBackrefWithSkip = 0x18, // Object is described relative to end.
// 0x19-0x1e One per space.
// 0x20-0x3f Used by misc. tags below.
kPointedToMask = 0x3f
@@ -566,14 +567,9 @@ class CodeSerializer : public Serializer {
static Object* Deserialize(Isolate* isolate, ScriptData* data);
- // The data header consists of int-sized entries:
- // [0] version hash
- // [1] length in bytes
- // [2..8] reservation sizes for spaces from NEW_SPACE to PROPERTY_CELL_SPACE.
- static const int kHeaderSize = 9;
- static const int kVersionHashOffset = 0;
- static const int kPayloadLengthOffset = 1;
- static const int kReservationsOffset = 2;
+ private:
+ void SerializeBuiltin(Code* builtin, HowToCode how_to_code,
+ WhereToPoint where_to_point, int skip);
};
« no previous file with comments | « no previous file | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698