| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |