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

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

Issue 2621383005: Reintroduce binary to load and save dill file. (Closed)
Patch Set: Removed useless line Created 3 years, 11 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/bin/BUILD.gn ('k') | runtime/vm/kernel_main.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #if !defined(DART_PRECOMPILED_RUNTIME) 4 #if !defined(DART_PRECOMPILED_RUNTIME)
5 5
6 #include <map> 6 #include <map>
7 #include <vector> 7 #include <vector>
8 8
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/flags.h" 10 #include "vm/flags.h"
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 } 888 }
889 889
890 fields().ReadFrom<Field>(reader, this); 890 fields().ReadFrom<Field>(reader, this);
891 procedures().ReadFrom<Procedure>(reader, this); 891 procedures().ReadFrom<Procedure>(reader, this);
892 return this; 892 return this;
893 } 893 }
894 894
895 895
896 void Library::WriteTo(Writer* writer) { 896 void Library::WriteTo(Writer* writer) {
897 TRACE_WRITE_OFFSET(); 897 TRACE_WRITE_OFFSET();
898 writer->WriteFlags(0);
898 name_->WriteTo(writer); 899 name_->WriteTo(writer);
899 import_uri_->WriteTo(writer); 900 import_uri_->WriteTo(writer);
900 writer->WriteUInt(source_uri_index_); 901 writer->WriteUInt(source_uri_index_);
901 902
902 writer->WriteUInt(classes_.length()); 903 writer->WriteUInt(classes_.length());
903 for (int i = 0; i < classes_.length(); i++) { 904 for (int i = 0; i < classes_.length(); i++) {
904 Class* klass = classes_[i]; 905 Class* klass = classes_[i];
905 if (klass->IsNormalClass()) { 906 if (klass->IsNormalClass()) {
906 writer->WriteTag(kNormalClass); 907 writer->WriteTag(kNormalClass);
907 NormalClass::Cast(klass)->WriteTo(writer); 908 NormalClass::Cast(klass)->WriteTo(writer);
(...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after
2954 void WritePrecompiledKernel(ByteWriter* byte_writer, kernel::Program* program) { 2955 void WritePrecompiledKernel(ByteWriter* byte_writer, kernel::Program* program) {
2955 ASSERT(byte_writer != NULL); 2956 ASSERT(byte_writer != NULL);
2956 2957
2957 kernel::Writer writer(byte_writer); 2958 kernel::Writer writer(byte_writer);
2958 program->WriteTo(&writer); 2959 program->WriteTo(&writer);
2959 } 2960 }
2960 2961
2961 2962
2962 } // namespace dart 2963 } // namespace dart
2963 #endif // !defined(DART_PRECOMPILED_RUNTIME) 2964 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/vm/kernel_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698