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

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

Issue 2988373002: Store parts in Kernel Library, resynthesize parts in Analyzer. (Closed)
Patch Set: Created 3 years, 4 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
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 void SkipListOfVariableDeclarations(); 407 void SkipListOfVariableDeclarations();
408 void SkipTypeParametersList(); 408 void SkipTypeParametersList();
409 void SkipExpression(); 409 void SkipExpression();
410 void SkipStatement(); 410 void SkipStatement();
411 void SkipFunctionNode(); 411 void SkipFunctionNode();
412 void SkipName(); 412 void SkipName();
413 void SkipArguments(); 413 void SkipArguments();
414 void SkipVariableDeclaration(); 414 void SkipVariableDeclaration();
415 void SkipLibraryCombinator(); 415 void SkipLibraryCombinator();
416 void SkipLibraryDependency(); 416 void SkipLibraryDependency();
417 void SkipLibraryPart();
417 void SkipLibraryTypedef(); 418 void SkipLibraryTypedef();
418 TokenPosition ReadPosition(bool record = true); 419 TokenPosition ReadPosition(bool record = true);
419 void record_token_position(TokenPosition position); 420 void record_token_position(TokenPosition position);
420 void record_yield_position(TokenPosition position); 421 void record_yield_position(TokenPosition position);
421 Tag ReadTag(uint8_t* payload = NULL); 422 Tag ReadTag(uint8_t* payload = NULL);
422 Tag PeekTag(uint8_t* payload = NULL); 423 Tag PeekTag(uint8_t* payload = NULL);
423 word ReadFlags(); 424 word ReadFlags();
424 425
425 void loop_depth_inc(); 426 void loop_depth_inc();
426 void loop_depth_dec(); 427 void loop_depth_dec();
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 // If asked to read a "non-dumb" field (e.g. an expression) it will be skipped. 1419 // If asked to read a "non-dumb" field (e.g. an expression) it will be skipped.
1419 class LibraryHelper { 1420 class LibraryHelper {
1420 public: 1421 public:
1421 enum Fields { 1422 enum Fields {
1422 kFlags, 1423 kFlags,
1423 kCanonicalName, 1424 kCanonicalName,
1424 kName, 1425 kName,
1425 kSourceUriIndex, 1426 kSourceUriIndex,
1426 kAnnotations, 1427 kAnnotations,
1427 kDependencies, 1428 kDependencies,
1429 kParts,
1428 kTypedefs, 1430 kTypedefs,
1429 kClasses, 1431 kClasses,
1430 kToplevelField, 1432 kToplevelField,
1431 kToplevelProcedures, 1433 kToplevelProcedures,
1432 kEnd 1434 kEnd
1433 }; 1435 };
1434 1436
1435 explicit LibraryHelper(StreamingFlowGraphBuilder* builder) { 1437 explicit LibraryHelper(StreamingFlowGraphBuilder* builder) {
1436 builder_ = builder; 1438 builder_ = builder;
1437 next_read_ = kFlags; 1439 next_read_ = kFlags;
(...skipping 27 matching lines...) Expand all
1465 case kAnnotations: 1467 case kAnnotations:
1466 builder_->SkipListOfExpressions(); // read annotations. 1468 builder_->SkipListOfExpressions(); // read annotations.
1467 if (++next_read_ == field) return; 1469 if (++next_read_ == field) return;
1468 case kDependencies: { 1470 case kDependencies: {
1469 intptr_t dependency_count = builder_->ReadUInt(); // read list length. 1471 intptr_t dependency_count = builder_->ReadUInt(); // read list length.
1470 for (intptr_t i = 0; i < dependency_count; ++i) { 1472 for (intptr_t i = 0; i < dependency_count; ++i) {
1471 builder_->SkipLibraryDependency(); 1473 builder_->SkipLibraryDependency();
1472 } 1474 }
1473 if (++next_read_ == field) return; 1475 if (++next_read_ == field) return;
1474 } 1476 }
1477 case kParts: {
1478 intptr_t part_count = builder_->ReadUInt(); // read list length.
1479 for (intptr_t i = 0; i < part_count; ++i) {
1480 builder_->SkipLibraryPart();
1481 }
1482 if (++next_read_ == field) return;
1483 }
1475 case kTypedefs: { 1484 case kTypedefs: {
1476 intptr_t typedef_count = 1485 intptr_t typedef_count =
1477 builder_->ReadListLength(); // read list length. 1486 builder_->ReadListLength(); // read list length.
1478 for (intptr_t i = 0; i < typedef_count; i++) { 1487 for (intptr_t i = 0; i < typedef_count; i++) {
1479 builder_->SkipLibraryTypedef(); 1488 builder_->SkipLibraryTypedef();
1480 } 1489 }
1481 if (++next_read_ == field) return; 1490 if (++next_read_ == field) return;
1482 } 1491 }
1483 case kClasses: { 1492 case kClasses: {
1484 int class_count = builder_->ReadListLength(); // read list length. 1493 int class_count = builder_->ReadListLength(); // read list length.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 private: 1553 private:
1545 Reader* reader_; 1554 Reader* reader_;
1546 intptr_t saved_offset_; 1555 intptr_t saved_offset_;
1547 }; 1556 };
1548 1557
1549 } // namespace kernel 1558 } // namespace kernel
1550 } // namespace dart 1559 } // namespace dart
1551 1560
1552 #endif // !defined(DART_PRECOMPILED_RUNTIME) 1561 #endif // !defined(DART_PRECOMPILED_RUNTIME)
1553 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_ 1562 #endif // RUNTIME_VM_KERNEL_BINARY_FLOWGRAPH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698