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

Side by Side Diff: runtime/vm/raw_object_snapshot.cc

Issue 2972343002: [kernel] Insert kernel bodies into VM heap (Closed)
Patch Set: Review comments Created 3 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | 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/native_entry.h" 5 #include "vm/native_entry.h"
6 #include "vm/object.h" 6 #include "vm/object.h"
7 #include "vm/object_store.h" 7 #include "vm/object_store.h"
8 #include "vm/snapshot.h" 8 #include "vm/snapshot.h"
9 #include "vm/stub_code.h" 9 #include "vm/stub_code.h"
10 #include "vm/symbols.h" 10 #include "vm/symbols.h"
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 writer->Write<int32_t>(ptr()->guarded_cid_); 870 writer->Write<int32_t>(ptr()->guarded_cid_);
871 writer->Write<int32_t>(ptr()->is_nullable_); 871 writer->Write<int32_t>(ptr()->is_nullable_);
872 writer->Write<uint8_t>(ptr()->kind_bits_); 872 writer->Write<uint8_t>(ptr()->kind_bits_);
873 873
874 // Write out the name. 874 // Write out the name.
875 writer->WriteObjectImpl(ptr()->name_, kAsReference); 875 writer->WriteObjectImpl(ptr()->name_, kAsReference);
876 // Write out the owner. 876 // Write out the owner.
877 writer->WriteObjectImpl(ptr()->owner_, kAsReference); 877 writer->WriteObjectImpl(ptr()->owner_, kAsReference);
878 // Write out the type. 878 // Write out the type.
879 writer->WriteObjectImpl(ptr()->type_, kAsReference); 879 writer->WriteObjectImpl(ptr()->type_, kAsReference);
880 // Write out the kernel_data.
881 writer->WriteObjectImpl(ptr()->kernel_data_, kAsReference);
880 // Write out the initial static value or field offset. 882 // Write out the initial static value or field offset.
881 if (Field::StaticBit::decode(ptr()->kind_bits_)) { 883 if (Field::StaticBit::decode(ptr()->kind_bits_)) {
882 if (Field::ConstBit::decode(ptr()->kind_bits_)) { 884 if (Field::ConstBit::decode(ptr()->kind_bits_)) {
883 // Do not reset const fields. 885 // Do not reset const fields.
884 writer->WriteObjectImpl(ptr()->value_.static_value_, kAsReference); 886 writer->WriteObjectImpl(ptr()->value_.static_value_, kAsReference);
885 } else { 887 } else {
886 // Otherwise, for static fields we write out the initial static value. 888 // Otherwise, for static fields we write out the initial static value.
887 writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference); 889 writer->WriteObjectImpl(ptr()->initializer_.saved_value_, kAsReference);
888 } 890 }
889 } else { 891 } else {
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2919 // We do not allow objects with native fields in an isolate message. 2921 // We do not allow objects with native fields in an isolate message.
2920 writer->SetWriteException(Exceptions::kArgument, 2922 writer->SetWriteException(Exceptions::kArgument,
2921 "Illegal argument in isolate message" 2923 "Illegal argument in isolate message"
2922 " : (object is a UserTag)"); 2924 " : (object is a UserTag)");
2923 } else { 2925 } else {
2924 UNREACHABLE(); 2926 UNREACHABLE();
2925 } 2927 }
2926 } 2928 }
2927 2929
2928 } // namespace dart 2930 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698