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

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: add-comment Created 5 years, 3 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/raw_object.h ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index ff8c43835f8ea102fe00c685e698efa15a01678b..72e2f2b5e064a52de6f4811ce9a8b77f167cdc2b 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -747,9 +747,25 @@ 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.
+ 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_)) {
+ // For static field we write out the initial static value.
+ writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference);
+ } else {
+ writer->WriteObjectImpl(ptr()->value_.offset_, kAsReference);
+ }
+ // Write out the dependent code.
+ writer->WriteObjectImpl(ptr()->dependent_code_, kAsReference);
+ // Write out the initializer value.
+ writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference);
+ // Write out the guarded list length.
+ writer->WriteObjectImpl(ptr()->guarded_list_length_, kAsReference);
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698