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

Side by Side Diff: pkg/analyzer/lib/src/summary/format.dart

Issue 1558353003: Add a count of type parameters to UnlinkedPublicName. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | 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 // This file has been automatically generated. Please do not edit it manually. 5 // This file has been automatically generated. Please do not edit it manually.
6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files". 6 // To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
7 7
8 library analyzer.src.summary.format; 8 library analyzer.src.summary.format;
9 9
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 1678 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 * TODO(paulberry): for classes, add info about static members and 1689 * TODO(paulberry): for classes, add info about static members and
1690 * constructors, since this will be needed to prelink info about constants. 1690 * constructors, since this will be needed to prelink info about constants.
1691 * 1691 *
1692 * TODO(paulberry): some of this information is redundant with information 1692 * TODO(paulberry): some of this information is redundant with information
1693 * elsewhere in the summary. Consider reducing the redundancy to reduce 1693 * elsewhere in the summary. Consider reducing the redundancy to reduce
1694 * summary size. 1694 * summary size.
1695 */ 1695 */
1696 class UnlinkedPublicName extends base.SummaryClass { 1696 class UnlinkedPublicName extends base.SummaryClass {
1697 String _name; 1697 String _name;
1698 PrelinkedReferenceKind _kind; 1698 PrelinkedReferenceKind _kind;
1699 int _numTypeParameters;
1699 1700
1700 UnlinkedPublicName.fromJson(Map json) 1701 UnlinkedPublicName.fromJson(Map json)
1701 : _name = json["name"], 1702 : _name = json["name"],
1702 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json[" kind"]]; 1703 _kind = json["kind"] == null ? null : PrelinkedReferenceKind.values[json[" kind"]],
1704 _numTypeParameters = json["numTypeParameters"];
1703 1705
1704 @override 1706 @override
1705 Map<String, Object> toMap() => { 1707 Map<String, Object> toMap() => {
1706 "name": name, 1708 "name": name,
1707 "kind": kind, 1709 "kind": kind,
1710 "numTypeParameters": numTypeParameters,
1708 }; 1711 };
1709 1712
1710 /** 1713 /**
1711 * The name itself. 1714 * The name itself.
1712 */ 1715 */
1713 String get name => _name ?? ''; 1716 String get name => _name ?? '';
1714 1717
1715 /** 1718 /**
1716 * The kind of object referred to by the name. 1719 * The kind of object referred to by the name.
1717 */ 1720 */
1718 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ; 1721 PrelinkedReferenceKind get kind => _kind ?? PrelinkedReferenceKind.classOrEnum ;
1722
1723 /**
1724 * If the entity being referred to is generic, the number of type parameters
1725 * it accepts. Otherwise zero.
1726 */
1727 int get numTypeParameters => _numTypeParameters ?? 0;
1719 } 1728 }
1720 1729
1721 class UnlinkedPublicNameBuilder { 1730 class UnlinkedPublicNameBuilder {
1722 final Map _json = {}; 1731 final Map _json = {};
1723 1732
1724 bool _finished = false; 1733 bool _finished = false;
1725 1734
1726 UnlinkedPublicNameBuilder(base.BuilderContext context); 1735 UnlinkedPublicNameBuilder(base.BuilderContext context);
1727 1736
1728 /** 1737 /**
(...skipping 11 matching lines...) Expand all
1740 * The kind of object referred to by the name. 1749 * The kind of object referred to by the name.
1741 */ 1750 */
1742 void set kind(PrelinkedReferenceKind _value) { 1751 void set kind(PrelinkedReferenceKind _value) {
1743 assert(!_finished); 1752 assert(!_finished);
1744 assert(!_json.containsKey("kind")); 1753 assert(!_json.containsKey("kind"));
1745 if (!(_value == null || _value == PrelinkedReferenceKind.classOrEnum)) { 1754 if (!(_value == null || _value == PrelinkedReferenceKind.classOrEnum)) {
1746 _json["kind"] = _value.index; 1755 _json["kind"] = _value.index;
1747 } 1756 }
1748 } 1757 }
1749 1758
1759 /**
1760 * If the entity being referred to is generic, the number of type parameters
1761 * it accepts. Otherwise zero.
1762 */
1763 void set numTypeParameters(int _value) {
1764 assert(!_finished);
1765 assert(!_json.containsKey("numTypeParameters"));
1766 if (_value != null) {
1767 _json["numTypeParameters"] = _value;
1768 }
1769 }
1770
1750 Map finish() { 1771 Map finish() {
1751 assert(!_finished); 1772 assert(!_finished);
1752 _finished = true; 1773 _finished = true;
1753 return _json; 1774 return _json;
1754 } 1775 }
1755 } 1776 }
1756 1777
1757 UnlinkedPublicNameBuilder encodeUnlinkedPublicName(base.BuilderContext builderCo ntext, {String name, PrelinkedReferenceKind kind}) { 1778 UnlinkedPublicNameBuilder encodeUnlinkedPublicName(base.BuilderContext builderCo ntext, {String name, PrelinkedReferenceKind kind, int numTypeParameters}) {
1758 UnlinkedPublicNameBuilder builder = new UnlinkedPublicNameBuilder(builderConte xt); 1779 UnlinkedPublicNameBuilder builder = new UnlinkedPublicNameBuilder(builderConte xt);
1759 builder.name = name; 1780 builder.name = name;
1760 builder.kind = kind; 1781 builder.kind = kind;
1782 builder.numTypeParameters = numTypeParameters;
1761 return builder; 1783 return builder;
1762 } 1784 }
1763 1785
1764 /** 1786 /**
1765 * Unlinked summary information about what a compilation unit contributes to a 1787 * Unlinked summary information about what a compilation unit contributes to a
1766 * library's public namespace. This is the subset of [UnlinkedUnit] that is 1788 * library's public namespace. This is the subset of [UnlinkedUnit] that is
1767 * required from dependent libraries in order to perform prelinking. 1789 * required from dependent libraries in order to perform prelinking.
1768 */ 1790 */
1769 class UnlinkedPublicNamespace extends base.SummaryClass { 1791 class UnlinkedPublicNamespace extends base.SummaryClass {
1770 List<UnlinkedPublicName> _names; 1792 List<UnlinkedPublicName> _names;
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext); 2661 UnlinkedVariableBuilder builder = new UnlinkedVariableBuilder(builderContext);
2640 builder.name = name; 2662 builder.name = name;
2641 builder.type = type; 2663 builder.type = type;
2642 builder.isStatic = isStatic; 2664 builder.isStatic = isStatic;
2643 builder.isFinal = isFinal; 2665 builder.isFinal = isFinal;
2644 builder.isConst = isConst; 2666 builder.isConst = isConst;
2645 builder.hasImplicitType = hasImplicitType; 2667 builder.hasImplicitType = hasImplicitType;
2646 return builder; 2668 return builder;
2647 } 2669 }
2648 2670
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/summary/public_namespace_computer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698