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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1289643005: Rename accessors of class Field to make it more apparent as to what is being accessed - static fiel… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: self-code-review Created 5 years, 4 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/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 3bb7b96215e9568c0ee4aa5500b90155da54807c..c1f23b064a76f05db63dcaaeb1bbbf13b1fe22e7 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -813,9 +813,24 @@ void RawField::WriteTo(SnapshotWriter* writer,
writer->Write<int32_t>(ptr()->is_nullable_);
writer->Write<uint8_t>(ptr()->kind_bits_);
- // Write out all the object pointer fields.
- SnapshotWriterVisitor visitor(writer);
- visitor.VisitPointers(from(), to());
+ // Write out the name.
rmacnak 2015/09/01 16:54:55 WriteObjectImpl doesn't care about the C++ type of
siva 2015/09/03 23:32:10 As discussed offline this is used to ensure that w
+ writer->WriteObjectImpl(ptr()->name_, kAsReference);
+ // Write out the owner.
+ writer->WriteObjectImpl(ptr()->owner_, kAsReference);
+ // Write out the type.
+ writer->WriteObjectImpl(ptr()->type_, kAsReference);
+ // Write out the initial static value or field offset.
+ if (Field::StaticBit::decode(ptr()->kind_bits_)) {
+ writer->WriteObjectImpl(ptr()->initializer_.value_, kAsReference);
rmacnak 2015/09/01 16:54:55 value_.value_
rmacnak 2015/09/01 18:28:51 Okay, nvm. Add a comment in the then branch that w
siva 2015/09/03 23:32:10 Acknowledged.
siva 2015/09/03 23:32:10 initializer_.saved_value_;
+ } else {
+ writer->WriteObjectImpl(ptr()->value_.value_, kAsReference);
+ }
+ // Write out the dependent code.
+ writer->WriteObjectImpl(ptr()->dependent_code_, kAsReference);
+ // Write out the initializer value.
+ writer->WriteObjectImpl(ptr()->initializer_.value_, kAsReference);
+ // Write out the guarded list length.
+ writer->WriteObjectImpl(ptr()->guarded_list_length_, kAsReference);
}

Powered by Google App Engine
This is Rietveld 408576698