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 | 4 |
5 #ifndef RUNTIME_VM_KERNEL_READER_H_ | 5 #ifndef RUNTIME_VM_KERNEL_READER_H_ |
6 #define RUNTIME_VM_KERNEL_READER_H_ | 6 #define RUNTIME_VM_KERNEL_READER_H_ |
7 | 7 |
8 #if !defined(DART_PRECOMPILED_RUNTIME) | 8 #if !defined(DART_PRECOMPILED_RUNTIME) |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 | 88 |
89 NameIndex library_canonical_name(intptr_t index) { | 89 NameIndex library_canonical_name(intptr_t index) { |
90 kernel::Reader reader(program_->kernel_data(), | 90 kernel::Reader reader(program_->kernel_data(), |
91 program_->kernel_data_size()); | 91 program_->kernel_data_size()); |
92 reader.set_offset(reader.size() - 4 - | 92 reader.set_offset(reader.size() - 4 - |
93 (program_->library_count() - index) * 4); | 93 (program_->library_count() - index) * 4); |
94 reader.set_offset(reader.ReadUInt32()); | 94 reader.set_offset(reader.ReadUInt32()); |
95 | 95 |
96 // Start reading library. | 96 // Start reading library. |
97 reader.ReadFlags(); // read flags. | 97 reader.ReadFlags(); |
98 return reader.ReadCanonicalNameReference(); | 98 return reader.ReadCanonicalNameReference(); |
99 } | 99 } |
100 | 100 |
101 uint8_t CharacterAt(StringIndex string_index, intptr_t index); | 101 uint8_t CharacterAt(StringIndex string_index, intptr_t index); |
102 | 102 |
103 static bool FieldHasFunctionLiteralInitializer(const Field& field, | 103 static bool FieldHasFunctionLiteralInitializer(const Field& field, |
104 TokenPosition* start, | 104 TokenPosition* start, |
105 TokenPosition* end); | 105 TokenPosition* end); |
106 | 106 |
107 private: | 107 private: |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 GrowableArray<const Function*> functions_; | 156 GrowableArray<const Function*> functions_; |
157 GrowableArray<const Field*> fields_; | 157 GrowableArray<const Field*> fields_; |
158 }; | 158 }; |
159 | 159 |
160 } // namespace kernel | 160 } // namespace kernel |
161 } // namespace dart | 161 } // namespace dart |
162 | 162 |
163 #endif // !defined(DART_PRECOMPILED_RUNTIME) | 163 #endif // !defined(DART_PRECOMPILED_RUNTIME) |
164 #endif // RUNTIME_VM_KERNEL_READER_H_ | 164 #endif // RUNTIME_VM_KERNEL_READER_H_ |
OLD | NEW |