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

Unified Diff: runtime/vm/snapshot.cc

Issue 324433003: In SnapshotReader, changes BackRefNode to be a ValueObject. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 37080)
+++ runtime/vm/snapshot.cc (working copy)
@@ -174,9 +174,9 @@
if (setjmp(*jump.Set()) == 0) {
Object& obj = Object::Handle(ReadObjectImpl());
for (intptr_t i = 0; i < backward_references_.length(); i++) {
- if (!backward_references_[i]->is_deserialized()) {
+ if (!backward_references_[i].is_deserialized()) {
ReadObjectImpl();
- backward_references_[i]->set_state(kIsDeserialized);
+ backward_references_[i].set_state(kIsDeserialized);
}
}
return obj.raw();
@@ -341,8 +341,7 @@
DeserializeState state) {
intptr_t index = (id - kMaxPredefinedObjectIds);
ASSERT(index == backward_references_.length());
- BackRefNode* node = new BackRefNode(obj, state);
- ASSERT(node != NULL);
+ BackRefNode node(obj, state);
backward_references_.Add(node);
}
@@ -351,7 +350,7 @@
ASSERT(id >= kMaxPredefinedObjectIds);
intptr_t index = (id - kMaxPredefinedObjectIds);
if (index < backward_references_.length()) {
- return backward_references_[index]->reference();
+ return backward_references_[index].reference();
}
return NULL;
}
@@ -374,9 +373,9 @@
*(object_store->from() + i) = ReadObjectImpl();
}
for (intptr_t i = 0; i < backward_references_.length(); i++) {
- if (!backward_references_[i]->is_deserialized()) {
+ if (!backward_references_[i].is_deserialized()) {
ReadObjectImpl();
- backward_references_[i]->set_state(kIsDeserialized);
+ backward_references_[i].set_state(kIsDeserialized);
}
}
« no previous file with comments | « runtime/vm/snapshot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698