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

Unified Diff: runtime/vm/snapshot.h

Issue 10444059: When generate snapshot use tags_ instead of class_ to store object ids. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
Index: runtime/vm/snapshot.h
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index ad0f2e07ba8e68ff8318dd5b2f6b83428f1a8c0a..bd30094e7135d6c93a51fb99030ad3bbb5b440ad 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -479,6 +479,7 @@ class SnapshotWriter : public BaseWriter {
: BaseWriter(buffer, alloc),
kind_(kind),
object_store_(Isolate::Current()->object_store()),
+ class_table_(Isolate::Current()->class_table()),
forward_list_() {
}
~SnapshotWriter() { }
@@ -505,16 +506,18 @@ class SnapshotWriter : public BaseWriter {
// Writes a full snapshot of the Isolate.
void WriteFullSnapshot();
+ uword GetObjectTags(RawObject* raw);
+
private:
class ForwardObjectNode : public ZoneAllocated {
public:
- ForwardObjectNode(RawObject* raw, RawClass* cls) : raw_(raw), cls_(cls) {}
+ ForwardObjectNode(RawObject* raw, uword tags) : raw_(raw), tags_(tags) {}
RawObject* raw() const { return raw_; }
- RawClass* cls() const { return cls_; }
+ uword tags() const { return tags_; }
private:
RawObject* raw_;
- RawClass* cls_;
+ uword tags_;
DISALLOW_COPY_AND_ASSIGN(ForwardObjectNode);
};
@@ -527,6 +530,7 @@ class SnapshotWriter : public BaseWriter {
Snapshot::Kind kind_;
ObjectStore* object_store_; // Object store for common classes.
+ ClassTable* class_table_; // Class table for the class index to class lookup.
GrowableArray<ForwardObjectNode*> forward_list_;
DISALLOW_COPY_AND_ASSIGN(SnapshotWriter);

Powered by Google App Engine
This is Rietveld 408576698