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

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

Issue 247683002: Reapply "Mark private functions in dart:* that are native or constructors as not visible (omitted f… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: regen snapshot test Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | tests/lib/lib.status » ('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/bigint_operations.h" 5 #include "vm/bigint_operations.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 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 library = NEW_OBJECT(Library); 1016 library = NEW_OBJECT(Library);
1017 1017
1018 // Set the object tags. 1018 // Set the object tags.
1019 library.set_tags(tags); 1019 library.set_tags(tags);
1020 1020
1021 // Set all non object fields. 1021 // Set all non object fields.
1022 library.raw_ptr()->index_ = reader->ReadIntptrValue(); 1022 library.raw_ptr()->index_ = reader->ReadIntptrValue();
1023 library.raw_ptr()->num_imports_ = reader->ReadIntptrValue(); 1023 library.raw_ptr()->num_imports_ = reader->ReadIntptrValue();
1024 library.raw_ptr()->num_anonymous_ = reader->ReadIntptrValue(); 1024 library.raw_ptr()->num_anonymous_ = reader->ReadIntptrValue();
1025 library.raw_ptr()->corelib_imported_ = reader->Read<bool>(); 1025 library.raw_ptr()->corelib_imported_ = reader->Read<bool>();
1026 library.raw_ptr()->is_dart_scheme_ = reader->Read<bool>();
1026 library.raw_ptr()->debuggable_ = reader->Read<bool>(); 1027 library.raw_ptr()->debuggable_ = reader->Read<bool>();
1027 library.raw_ptr()->load_state_ = reader->Read<int8_t>(); 1028 library.raw_ptr()->load_state_ = reader->Read<int8_t>();
1028 // The native resolver is not serialized. 1029 // The native resolver is not serialized.
1029 Dart_NativeEntryResolver resolver = 1030 Dart_NativeEntryResolver resolver =
1030 reader->Read<Dart_NativeEntryResolver>(); 1031 reader->Read<Dart_NativeEntryResolver>();
1031 ASSERT(resolver == NULL); 1032 ASSERT(resolver == NULL);
1032 library.set_native_entry_resolver(resolver); 1033 library.set_native_entry_resolver(resolver);
1033 // The cache of loaded scripts is not serialized. 1034 // The cache of loaded scripts is not serialized.
1034 library.raw_ptr()->loaded_scripts_ = Array::null(); 1035 library.raw_ptr()->loaded_scripts_ = Array::null();
1035 1036
(...skipping 29 matching lines...) Expand all
1065 RawObject::IsCreatedFromSnapshot(writer->GetObjectTags(this))) { 1066 RawObject::IsCreatedFromSnapshot(writer->GetObjectTags(this))) {
1066 ASSERT(kind != Snapshot::kFull); 1067 ASSERT(kind != Snapshot::kFull);
1067 // Write out library URL so that it can be looked up when reading. 1068 // Write out library URL so that it can be looked up when reading.
1068 writer->WriteObjectImpl(ptr()->url_); 1069 writer->WriteObjectImpl(ptr()->url_);
1069 } else { 1070 } else {
1070 // Write out all non object fields. 1071 // Write out all non object fields.
1071 writer->WriteIntptrValue(ptr()->index_); 1072 writer->WriteIntptrValue(ptr()->index_);
1072 writer->WriteIntptrValue(ptr()->num_imports_); 1073 writer->WriteIntptrValue(ptr()->num_imports_);
1073 writer->WriteIntptrValue(ptr()->num_anonymous_); 1074 writer->WriteIntptrValue(ptr()->num_anonymous_);
1074 writer->Write<bool>(ptr()->corelib_imported_); 1075 writer->Write<bool>(ptr()->corelib_imported_);
1076 writer->Write<bool>(ptr()->is_dart_scheme_);
1075 writer->Write<bool>(ptr()->debuggable_); 1077 writer->Write<bool>(ptr()->debuggable_);
1076 writer->Write<int8_t>(ptr()->load_state_); 1078 writer->Write<int8_t>(ptr()->load_state_);
1077 // We do not serialize the native resolver over, this needs to be explicitly 1079 // We do not serialize the native resolver over, this needs to be explicitly
1078 // set after deserialization. 1080 // set after deserialization.
1079 writer->Write<Dart_NativeEntryResolver>(NULL); 1081 writer->Write<Dart_NativeEntryResolver>(NULL);
1080 // We do not write the loaded_scripts_ cache to the snapshot. It gets 1082 // We do not write the loaded_scripts_ cache to the snapshot. It gets
1081 // set to NULL when reading the library from the snapshot, and will 1083 // set to NULL when reading the library from the snapshot, and will
1082 // be rebuilt lazily. 1084 // be rebuilt lazily.
1083 1085
1084 // Write out all the object pointer fields. 1086 // Write out all the object pointer fields.
(...skipping 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 // We do not allow objects with native fields in an isolate message. 2712 // We do not allow objects with native fields in an isolate message.
2711 writer->SetWriteException(Exceptions::kArgument, 2713 writer->SetWriteException(Exceptions::kArgument,
2712 "Illegal argument in isolate message" 2714 "Illegal argument in isolate message"
2713 " : (object is a UserTag)"); 2715 " : (object is a UserTag)");
2714 } else { 2716 } else {
2715 UNREACHABLE(); 2717 UNREACHABLE();
2716 } 2718 }
2717 } 2719 }
2718 2720
2719 } // namespace dart 2721 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698