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

Side by Side Diff: pkg/analyzer/tool/summary/idl.dart

Issue 1543403002: Create a section of the summary for public namespace information. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 12 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/analyzer/test/src/summary/summary_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /** 5 /**
6 * This file is an "idl" style description of the summary format. It is not 6 * This file is an "idl" style description of the summary format. It is not
7 * executed directly; instead it is parsed and transformed into code that 7 * executed directly; instead it is parsed and transformed into code that
8 * implements the summary format. 8 * implements the summary format.
9 * 9 *
10 * The code generation process introduces the following non-typical semantics: 10 * The code generation process introduces the following non-typical semantics:
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 * Unlinked summary information about a part declaration. 535 * Unlinked summary information about a part declaration.
536 */ 536 */
537 class UnlinkedPart { 537 class UnlinkedPart {
538 /** 538 /**
539 * String used in the compilation unit to refer to the part file. 539 * String used in the compilation unit to refer to the part file.
540 */ 540 */
541 String uri; 541 String uri;
542 } 542 }
543 543
544 /** 544 /**
545 * Unlinked summary information about a specific name contributed by a
546 * compilation unit to a library's public namespace.
547 *
548 * TODO(paulberry): add a count of generic parameters, so that resynthesis
549 * doesn't have to peek into the library to obtain this info.
550 *
551 * TODO(paulberry): for classes, add info about static members and
552 * constructors, since this will be needed to prelink info about constants.
553 *
554 * TODO(paulberry): some of this information is redundant with information
555 * elsewhere in the summary. Consider reducing the redundancy to reduce
556 * summary size.
557 */
558 class UnlinkedPublicName {
559 /**
560 * The name itself.
561 */
562 String name;
563
564 /**
565 * The kind of object referred to by the name.
566 */
567 PrelinkedReferenceKind kind;
568 }
569
570 /**
571 * Unlinked summary information about what a compilation unit contributes to a
572 * library's public namespace. This is the subset of [UnlinkedUnit] that is
573 * required from dependent libraries in order to perform prelinking.
574 */
575 class UnlinkedPublicNamespace {
576 /**
577 * Public names defined in the compilation unit.
578 *
579 * TODO(paulberry): consider sorting these names to reduce unnecessary
580 * relinking.
581 */
582 List<UnlinkedPublicName> names;
583
584 /**
585 * Export declarations in the compilation unit.
586 */
587 List<UnlinkedExport> exports;
588
589 /**
590 * Part declarations in the compilation unit.
591 */
592 List<UnlinkedPart> parts;
593 }
594
595 /**
545 * Unlinked summary information about a name referred to in one library that 596 * Unlinked summary information about a name referred to in one library that
546 * might be defined in another. 597 * might be defined in another.
547 */ 598 */
548 class UnlinkedReference { 599 class UnlinkedReference {
549 /** 600 /**
550 * Name of the entity being referred to. The empty string refers to the 601 * Name of the entity being referred to. The empty string refers to the
551 * pseudo-type `dynamic`. 602 * pseudo-type `dynamic`.
552 */ 603 */
553 String name; 604 String name;
554 605
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 * Unlinked summary information about a compilation unit ("part file"). 699 * Unlinked summary information about a compilation unit ("part file").
649 */ 700 */
650 @topLevel 701 @topLevel
651 class UnlinkedUnit { 702 class UnlinkedUnit {
652 /** 703 /**
653 * Name of the library (from a "library" declaration, if present). 704 * Name of the library (from a "library" declaration, if present).
654 */ 705 */
655 String libraryName; 706 String libraryName;
656 707
657 /** 708 /**
709 * Unlinked public namespace of this compilation unit.
710 */
711 UnlinkedPublicNamespace publicNamespace;
712
713 /**
658 * Top level and prefixed names referred to by this compilation unit. The 714 * Top level and prefixed names referred to by this compilation unit. The
659 * zeroth element of this array is always populated and always represents a 715 * zeroth element of this array is always populated and always represents a
660 * reference to the pseudo-type "dynamic". 716 * reference to the pseudo-type "dynamic".
661 */ 717 */
662 List<UnlinkedReference> references; 718 List<UnlinkedReference> references;
663 719
664 /** 720 /**
665 * Classes declared in the compilation unit. 721 * Classes declared in the compilation unit.
666 */ 722 */
667 List<UnlinkedClass> classes; 723 List<UnlinkedClass> classes;
668 724
669 /** 725 /**
670 * Enums declared in the compilation unit. 726 * Enums declared in the compilation unit.
671 */ 727 */
672 List<UnlinkedEnum> enums; 728 List<UnlinkedEnum> enums;
673 729
674 /** 730 /**
675 * Top level executable objects (functions, getters, and setters) declared in 731 * Top level executable objects (functions, getters, and setters) declared in
676 * the compilation unit. 732 * the compilation unit.
677 */ 733 */
678 List<UnlinkedExecutable> executables; 734 List<UnlinkedExecutable> executables;
679 735
680 /** 736 /**
681 * Export declarations in the compilation unit.
682 */
683 List<UnlinkedExport> exports;
684
685 /**
686 * Import declarations in the compilation unit. 737 * Import declarations in the compilation unit.
687 */ 738 */
688 List<UnlinkedImport> imports; 739 List<UnlinkedImport> imports;
689 740
690 /** 741 /**
691 * Part declarations in the compilation unit.
692 */
693 List<UnlinkedPart> parts;
694
695 /**
696 * Typedefs declared in the compilation unit. 742 * Typedefs declared in the compilation unit.
697 */ 743 */
698 List<UnlinkedTypedef> typedefs; 744 List<UnlinkedTypedef> typedefs;
699 745
700 /** 746 /**
701 * Top level variables declared in the compilation unit. 747 * Top level variables declared in the compilation unit.
702 */ 748 */
703 List<UnlinkedVariable> variables; 749 List<UnlinkedVariable> variables;
704 } 750 }
705 751
(...skipping 30 matching lines...) Expand all
736 /** 782 /**
737 * Indicates whether the variable is declared using the `const` keyword. 783 * Indicates whether the variable is declared using the `const` keyword.
738 */ 784 */
739 bool isConst; 785 bool isConst;
740 786
741 /** 787 /**
742 * Indicates whether this variable lacks an explicit type declaration. 788 * Indicates whether this variable lacks an explicit type declaration.
743 */ 789 */
744 bool hasImplicitType; 790 bool hasImplicitType;
745 } 791 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698