Chromium Code Reviews

Unified Diff: src/serialize.h

Issue 339103005: Remove unnecessary virtual methods in the serializer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | 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 f05a42ae2aa814b55628f42cbe0c21c70e2208f6..9e3cc88662e0b053a3c2705cf3bde11c11a49cd5 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -456,7 +456,6 @@ class Serializer : public SerializerDeserializer {
static const int kInvalidRootIndex = -1;
int RootIndex(HeapObject* heap_object, HowToCode from);
- virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) = 0;
intptr_t root_index_wave_front() { return root_index_wave_front_; }
void set_root_index_wave_front(intptr_t value) {
ASSERT(value >= root_index_wave_front_);
@@ -572,15 +571,15 @@ class PartialSerializer : public Serializer {
}
// Serialize the objects reachable from a single object pointer.
- virtual void Serialize(Object** o);
+ void Serialize(Object** o);
virtual void SerializeObject(Object* o,
HowToCode how_to_code,
WhereToPoint where_to_point,
int skip);
- protected:
- virtual int PartialSnapshotCacheIndex(HeapObject* o);
- virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
+ private:
+ int PartialSnapshotCacheIndex(HeapObject* o);
+ bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
// Scripts should be referred only through shared function infos. We can't
// allow them to be part of the partial snapshot because they contain a
// unique ID, and deserializing several partial snapshots containing script
@@ -593,7 +592,7 @@ class PartialSerializer : public Serializer {
startup_serializer_->isolate()->heap()->fixed_cow_array_map();
}
- private:
+
Serializer* startup_serializer_;
DISALLOW_COPY_AND_ASSIGN(PartialSerializer);
};
@@ -625,11 +624,6 @@ class StartupSerializer : public Serializer {
SerializeWeakReferences();
Pad();
}
-
- private:
- virtual bool ShouldBeInThePartialSnapshotCache(HeapObject* o) {
- return false;
- }
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine