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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/object.h" 5 #include "vm/object.h"
6 #include "vm/object_store.h" 6 #include "vm/object_store.h"
7 #include "vm/snapshot.h" 7 #include "vm/snapshot.h"
8 #include "vm/stub_code.h" 8 #include "vm/stub_code.h"
9 #include "vm/symbols.h" 9 #include "vm/symbols.h"
10 #include "vm/visitor.h" 10 #include "vm/visitor.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 // Write out the class and tags information. 740 // Write out the class and tags information.
741 writer->WriteVMIsolateObject(kFieldCid); 741 writer->WriteVMIsolateObject(kFieldCid);
742 writer->WriteTags(writer->GetObjectTags(this)); 742 writer->WriteTags(writer->GetObjectTags(this));
743 743
744 // Write out all the non object fields. 744 // Write out all the non object fields.
745 writer->Write<int32_t>(ptr()->token_pos_); 745 writer->Write<int32_t>(ptr()->token_pos_);
746 writer->Write<int32_t>(ptr()->guarded_cid_); 746 writer->Write<int32_t>(ptr()->guarded_cid_);
747 writer->Write<int32_t>(ptr()->is_nullable_); 747 writer->Write<int32_t>(ptr()->is_nullable_);
748 writer->Write<uint8_t>(ptr()->kind_bits_); 748 writer->Write<uint8_t>(ptr()->kind_bits_);
749 749
750 // Write out all the object pointer fields. 750 // Write out the name.
751 SnapshotWriterVisitor visitor(writer); 751 writer->WriteObjectImpl(ptr()->name_, kAsReference);
752 visitor.VisitPointers(from(), to()); 752 // Write out the owner.
753 writer->WriteObjectImpl(ptr()->owner_, kAsReference);
754 // Write out the type.
755 writer->WriteObjectImpl(ptr()->type_, kAsReference);
756 // Write out the initial static value or field offset.
757 if (Field::StaticBit::decode(ptr()->kind_bits_)) {
758 // For static field we write out the initial static value.
759 writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference);
760 } else {
761 writer->WriteObjectImpl(ptr()->value_.offset_, kAsReference);
762 }
763 // Write out the dependent code.
764 writer->WriteObjectImpl(ptr()->dependent_code_, kAsReference);
765 // Write out the initializer value.
766 writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference);
767 // Write out the guarded list length.
768 writer->WriteObjectImpl(ptr()->guarded_list_length_, kAsReference);
753 } 769 }
754 770
755 771
756 RawLiteralToken* LiteralToken::ReadFrom(SnapshotReader* reader, 772 RawLiteralToken* LiteralToken::ReadFrom(SnapshotReader* reader,
757 intptr_t object_id, 773 intptr_t object_id,
758 intptr_t tags, 774 intptr_t tags,
759 Snapshot::Kind kind) { 775 Snapshot::Kind kind) {
760 ASSERT(reader != NULL); 776 ASSERT(reader != NULL);
761 ASSERT(kind != Snapshot::kMessage); 777 ASSERT(kind != Snapshot::kMessage);
762 778
(...skipping 2469 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 // We do not allow objects with native fields in an isolate message. 3248 // We do not allow objects with native fields in an isolate message.
3233 writer->SetWriteException(Exceptions::kArgument, 3249 writer->SetWriteException(Exceptions::kArgument,
3234 "Illegal argument in isolate message" 3250 "Illegal argument in isolate message"
3235 " : (object is a UserTag)"); 3251 " : (object is a UserTag)");
3236 } else { 3252 } else {
3237 UNREACHABLE(); 3253 UNREACHABLE();
3238 } 3254 }
3239 } 3255 }
3240 3256
3241 } // namespace dart 3257 } // namespace dart
OLDNEW
« 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