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

Side by Side Diff: runtime/vm/kernel_binary_flowgraph.h

Issue 2977133002: Add documentationComment for Class to Kernel. Parse it. Resynthesize in Analyzer. (Closed)
Patch Set: Created 3 years, 5 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 | « pkg/kernel/lib/binary/ast_to_binary.dart ('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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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_BINARY_FLOWGRAPH_H_ 5 #ifndef RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 6 #define RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
7 7
8 #if !defined(DART_PRECOMPILED_RUNTIME) 8 #if !defined(DART_PRECOMPILED_RUNTIME)
9 9
10 #include <map> 10 #include <map>
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 class ClassHelper { 1205 class ClassHelper {
1206 public: 1206 public:
1207 enum Fields { 1207 enum Fields {
1208 kStart, // tag. 1208 kStart, // tag.
1209 kCanonicalName, 1209 kCanonicalName,
1210 kPosition, 1210 kPosition,
1211 kEndPosition, 1211 kEndPosition,
1212 kIsAbstract, 1212 kIsAbstract,
1213 kNameIndex, 1213 kNameIndex,
1214 kSourceUriIndex, 1214 kSourceUriIndex,
1215 kDocumentationCommentIndex,
1215 kAnnotations, 1216 kAnnotations,
1216 kTypeParameters, 1217 kTypeParameters,
1217 kSuperClass, 1218 kSuperClass,
1218 kMixinType, 1219 kMixinType,
1219 kImplementedClasses, 1220 kImplementedClasses,
1220 kFields, 1221 kFields,
1221 kConstructors, 1222 kConstructors,
1222 kProcedures, 1223 kProcedures,
1223 kEnd 1224 kEnd
1224 }; 1225 };
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1256 is_abstract_ = builder_->ReadBool(); // read is_abstract. 1257 is_abstract_ = builder_->ReadBool(); // read is_abstract.
1257 if (++next_read_ == field) return; 1258 if (++next_read_ == field) return;
1258 case kNameIndex: 1259 case kNameIndex:
1259 name_index_ = builder_->ReadStringReference(); // read name index. 1260 name_index_ = builder_->ReadStringReference(); // read name index.
1260 if (++next_read_ == field) return; 1261 if (++next_read_ == field) return;
1261 case kSourceUriIndex: 1262 case kSourceUriIndex:
1262 source_uri_index_ = builder_->ReadUInt(); // read source_uri_index. 1263 source_uri_index_ = builder_->ReadUInt(); // read source_uri_index.
1263 builder_->current_script_id_ = source_uri_index_; 1264 builder_->current_script_id_ = source_uri_index_;
1264 builder_->record_token_position(position_); 1265 builder_->record_token_position(position_);
1265 if (++next_read_ == field) return; 1266 if (++next_read_ == field) return;
1267 case kDocumentationCommentIndex:
1268 documentation_comment_index_ = builder_->ReadStringReference();
Paul Berry 2017/07/14 22:03:08 Would it be better for the VM to just skip documen
Siggi Cherem (dart-lang) 2017/07/14 22:12:43 I share your concerns too, I like the idea of just
scheglov 2017/07/15 00:41:57 I agree, we can just skip it.
1269 if (++next_read_ == field) return;
1266 case kAnnotations: { 1270 case kAnnotations: {
1267 annotation_count_ = builder_->ReadListLength(); // read list length. 1271 annotation_count_ = builder_->ReadListLength(); // read list length.
1268 for (intptr_t i = 0; i < annotation_count_; ++i) { 1272 for (intptr_t i = 0; i < annotation_count_; ++i) {
1269 builder_->SkipExpression(); // read ith expression. 1273 builder_->SkipExpression(); // read ith expression.
1270 } 1274 }
1271 if (++next_read_ == field) return; 1275 if (++next_read_ == field) return;
1272 } 1276 }
1273 case kTypeParameters: 1277 case kTypeParameters:
1274 builder_->SkipTypeParametersList(); // read type parameters. 1278 builder_->SkipTypeParametersList(); // read type parameters.
1275 if (++next_read_ == field) return; 1279 if (++next_read_ == field) return;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1329 next_read_ = field; 1333 next_read_ = field;
1330 ++next_read_; 1334 ++next_read_;
1331 } 1335 }
1332 1336
1333 NameIndex canonical_name_; 1337 NameIndex canonical_name_;
1334 TokenPosition position_; 1338 TokenPosition position_;
1335 TokenPosition end_position_; 1339 TokenPosition end_position_;
1336 bool is_abstract_; 1340 bool is_abstract_;
1337 StringIndex name_index_; 1341 StringIndex name_index_;
1338 intptr_t source_uri_index_; 1342 intptr_t source_uri_index_;
1343 StringIndex documentation_comment_index_;
1339 intptr_t annotation_count_; 1344 intptr_t annotation_count_;
1340 1345
1341 private: 1346 private:
1342 StreamingFlowGraphBuilder* builder_; 1347 StreamingFlowGraphBuilder* builder_;
1343 intptr_t next_read_; 1348 intptr_t next_read_;
1344 }; 1349 };
1345 1350
1346 // Helper class that reads a kernel Library from binary. 1351 // Helper class that reads a kernel Library from binary.
1347 // 1352 //
1348 // Use ReadUntilExcluding to read up to but not including a field. 1353 // Use ReadUntilExcluding to read up to but not including a field.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1478 private: 1483 private:
1479 Reader* reader_; 1484 Reader* reader_;
1480 intptr_t saved_offset_; 1485 intptr_t saved_offset_;
1481 }; 1486 };
1482 1487
1483 } // namespace kernel 1488 } // namespace kernel
1484 } // namespace dart 1489 } // namespace dart
1485 1490
1486 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1491 #endif // !defined(DART_PRECOMPILED_RUNTIME)
1487 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 1492 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698