| Index: src/serialize.h
|
| diff --git a/src/serialize.h b/src/serialize.h
|
| index f344e5ae5769de5759f8db5d1c07e92334440ee5..74c5e6d4588c9b473b317ade82b49ee0c9860601 100644
|
| --- a/src/serialize.h
|
| +++ b/src/serialize.h
|
| @@ -348,6 +348,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
|
| @@ -357,6 +360,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;
|
| @@ -611,23 +617,21 @@ class Serializer : public SerializerDeserializer {
|
| protected:
|
| class ObjectSerializer : public ObjectVisitor {
|
| public:
|
| - ObjectSerializer(Serializer* serializer,
|
| - Object* o,
|
| - SnapshotByteSink* sink,
|
| - HowToCode how_to_code,
|
| - WhereToPoint where_to_point)
|
| - : serializer_(serializer),
|
| - object_(HeapObject::cast(o)),
|
| - sink_(sink),
|
| - reference_representation_(how_to_code + where_to_point),
|
| - bytes_processed_so_far_(0),
|
| - code_object_(o->IsCode()),
|
| - code_has_been_output_(false) { }
|
| + ObjectSerializer(Serializer* serializer, Object* o, SnapshotByteSink* sink,
|
| + HowToCode how_to_code, WhereToPoint where_to_point)
|
| + : serializer_(serializer),
|
| + object_(HeapObject::cast(o)),
|
| + sink_(sink),
|
| + reference_representation_(how_to_code + where_to_point),
|
| + bytes_processed_so_far_(0),
|
| + is_code_object_(o->IsCode()),
|
| + code_has_been_output_(false) {}
|
| void Serialize();
|
| void VisitPointers(Object** start, Object** end);
|
| 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);
|
| @@ -660,7 +664,7 @@ class Serializer : public SerializerDeserializer {
|
| SnapshotByteSink* sink_;
|
| int reference_representation_;
|
| int bytes_processed_so_far_;
|
| - bool code_object_;
|
| + bool is_code_object_;
|
| bool code_has_been_output_;
|
| };
|
|
|
|
|