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

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

Issue 1596703002: Generate code UnlinkedConst / UnlinkedConstOperation. (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/tool/summary/generate.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 'base.dart' as base; 10 import 'base.dart' as base;
(...skipping 19 matching lines...) Expand all
30 int get size => 4; 30 int get size => 4;
31 31
32 @override 32 @override
33 ReferenceKind read(fb.BufferPointer bp) { 33 ReferenceKind read(fb.BufferPointer bp) {
34 int index = const fb.Int32Reader().read(bp); 34 int index = const fb.Int32Reader().read(bp);
35 return ReferenceKind.values[index]; 35 return ReferenceKind.values[index];
36 } 36 }
37 } 37 }
38 38
39 /** 39 /**
40 * Enum representing the various kinds of operations which may be performed to
41 * produce a constant value. These options are assumed to execute in the
42 * context of a stack which is initially empty.
43 */
44 enum UnlinkedConstOperation {
45 pushArgument,
46 pushInt,
47 shiftOr,
48 pushDouble,
49 pushTrue,
50 pushFalse,
51 pushString,
52 concatenate,
53 makeSymbol,
54 pushNull,
55 pushReference,
56 invokeConstructor,
57 makeList,
58 makeMap,
59 identical,
60 equal,
61 not,
62 and,
63 or,
64 complement,
65 bitXor,
66 bitAnd,
67 bitOr,
68 bitShiftRight,
69 bitShiftLeft,
70 add,
71 negate,
72 subtract,
73 multiply,
74 divide,
75 floorDivide,
76 greater,
77 less,
78 greaterEqual,
79 lessEqual,
80 modulo,
81 conditional,
82 length,
83 }
84
85 class _UnlinkedConstOperationReader extends fb.Reader<UnlinkedConstOperation> {
86 const _UnlinkedConstOperationReader() : super();
87
88 @override
89 int get size => 4;
90
91 @override
92 UnlinkedConstOperation read(fb.BufferPointer bp) {
93 int index = const fb.Int32Reader().read(bp);
94 return UnlinkedConstOperation.values[index];
95 }
96 }
97
98 /**
40 * Enum used to indicate the kind of an executable. 99 * Enum used to indicate the kind of an executable.
41 */ 100 */
42 enum UnlinkedExecutableKind { 101 enum UnlinkedExecutableKind {
43 functionOrMethod, 102 functionOrMethod,
44 getter, 103 getter,
45 setter, 104 setter,
46 constructor, 105 constructor,
47 } 106 }
48 107
49 class _UnlinkedExecutableKindReader extends fb.Reader<UnlinkedExecutableKind> { 108 class _UnlinkedExecutableKindReader extends fb.Reader<UnlinkedExecutableKind> {
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 } 1595 }
1537 1596
1538 abstract class _UnlinkedCombinatorMixin implements UnlinkedCombinator { 1597 abstract class _UnlinkedCombinatorMixin implements UnlinkedCombinator {
1539 @override 1598 @override
1540 Map<String, Object> toMap() => { 1599 Map<String, Object> toMap() => {
1541 "shows": shows, 1600 "shows": shows,
1542 "hides": hides, 1601 "hides": hides,
1543 }; 1602 };
1544 } 1603 }
1545 1604
1605 class UnlinkedConstBuilder extends Object with _UnlinkedConstMixin implements Un linkedConst {
1606 bool _finished = false;
1607
1608 List<UnlinkedConstOperation> _operations;
1609 List<int> _ints;
1610 List<double> _doubles;
1611 List<String> _strings;
1612 List<UnlinkedTypeRefBuilder> _references;
1613
1614 @override
1615 List<UnlinkedConstOperation> get operations => _operations ?? const <UnlinkedC onstOperation>[];
1616
1617 /**
1618 * Sequence of operations to execute (starting with an empty stack) to form
1619 * the constant value.
1620 */
1621 void set operations(List<UnlinkedConstOperation> _value) {
1622 assert(!_finished);
1623 _operations = _value;
1624 }
1625
1626 @override
1627 List<int> get ints => _ints ?? const <int>[];
1628
1629 /**
1630 * Sequence of 32-bit integers consumed by the operations `pushArgument`,
1631 * `pushInt`, `shiftOr`, `concatenate`, `invokeConstructor`, `makeList`, and
1632 * `makeMap`.
1633 */
1634 void set ints(List<int> _value) {
1635 assert(!_finished);
1636 _ints = _value;
1637 }
1638
1639 @override
1640 List<double> get doubles => _doubles ?? const <double>[];
1641
1642 /**
1643 * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
1644 */
1645 void set doubles(List<double> _value) {
1646 assert(!_finished);
1647 _doubles = _value;
1648 }
1649
1650 @override
1651 List<String> get strings => _strings ?? const <String>[];
1652
1653 /**
1654 * Sequence of strings consumed by the operations `pushString` and
1655 * `invokeConstructor`.
1656 */
1657 void set strings(List<String> _value) {
1658 assert(!_finished);
1659 _strings = _value;
1660 }
1661
1662 @override
1663 List<UnlinkedTypeRef> get references => _references ?? const <UnlinkedTypeRef> [];
1664
1665 /**
1666 * Sequence of language constructs consumed by the operations
1667 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note
1668 * that in the case of `pushReference` (and sometimes `invokeConstructor` the
1669 * actual entity being referred to may be something other than a type.
1670 */
1671 void set references(List<UnlinkedTypeRefBuilder> _value) {
1672 assert(!_finished);
1673 _references = _value;
1674 }
1675
1676 UnlinkedConstBuilder({List<UnlinkedConstOperation> operations, List<int> ints, List<double> doubles, List<String> strings, List<UnlinkedTypeRefBuilder> refere nces})
1677 : _operations = operations,
1678 _ints = ints,
1679 _doubles = doubles,
1680 _strings = strings,
1681 _references = references;
1682
1683 fb.Offset finish(fb.Builder fbBuilder) {
1684 assert(!_finished);
1685 _finished = true;
1686 fb.Offset offset_operations;
1687 fb.Offset offset_ints;
1688 fb.Offset offset_doubles;
1689 fb.Offset offset_strings;
1690 fb.Offset offset_references;
1691 if (!(_operations == null || _operations.isEmpty)) {
1692 offset_operations = fbBuilder.writeListInt32(_operations.map((b) => b.inde x).toList());
1693 }
1694 if (!(_ints == null || _ints.isEmpty)) {
1695 offset_ints = fbBuilder.writeListInt32(_ints);
1696 }
1697 if (!(_doubles == null || _doubles.isEmpty)) {
1698 offset_doubles = fbBuilder.writeListFloat64(_doubles);
1699 }
1700 if (!(_strings == null || _strings.isEmpty)) {
1701 offset_strings = fbBuilder.writeList(_strings.map((b) => fbBuilder.writeSt ring(b)).toList());
1702 }
1703 if (!(_references == null || _references.isEmpty)) {
1704 offset_references = fbBuilder.writeList(_references.map((b) => b.finish(fb Builder)).toList());
1705 }
1706 fbBuilder.startTable();
1707 if (offset_operations != null) {
1708 fbBuilder.addOffset(0, offset_operations);
1709 }
1710 if (offset_ints != null) {
1711 fbBuilder.addOffset(1, offset_ints);
1712 }
1713 if (offset_doubles != null) {
1714 fbBuilder.addOffset(2, offset_doubles);
1715 }
1716 if (offset_strings != null) {
1717 fbBuilder.addOffset(3, offset_strings);
1718 }
1719 if (offset_references != null) {
1720 fbBuilder.addOffset(4, offset_references);
1721 }
1722 return fbBuilder.endTable();
1723 }
1724 }
1725
1726 /**
1727 * Unlinked summary information about a compile-time constant expression, or a
1728 * potentially constant expression.
1729 *
1730 * Constant expressions are represented using a simple stack-based language
1731 * where [operations] is a sequence of operations to execute starting with an
1732 * empty stack. Once all operations have been executed, the stack should
1733 * contain a single value which is the value of the constant. Note that some
1734 * operations consume additional data from the other fields of this class.
1735 */
1736 abstract class UnlinkedConst extends base.SummaryClass {
1737
1738 /**
1739 * Sequence of operations to execute (starting with an empty stack) to form
1740 * the constant value.
1741 */
1742 List<UnlinkedConstOperation> get operations;
1743
1744 /**
1745 * Sequence of 32-bit integers consumed by the operations `pushArgument`,
1746 * `pushInt`, `shiftOr`, `concatenate`, `invokeConstructor`, `makeList`, and
1747 * `makeMap`.
1748 */
1749 List<int> get ints;
1750
1751 /**
1752 * Sequence of 64-bit doubles consumed by the operation `pushDouble`.
1753 */
1754 List<double> get doubles;
1755
1756 /**
1757 * Sequence of strings consumed by the operations `pushString` and
1758 * `invokeConstructor`.
1759 */
1760 List<String> get strings;
1761
1762 /**
1763 * Sequence of language constructs consumed by the operations
1764 * `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`. Note
1765 * that in the case of `pushReference` (and sometimes `invokeConstructor` the
1766 * actual entity being referred to may be something other than a type.
1767 */
1768 List<UnlinkedTypeRef> get references;
1769 }
1770
1771 class _UnlinkedConstReader extends fb.TableReader<_UnlinkedConstImpl> {
1772 const _UnlinkedConstReader();
1773
1774 @override
1775 _UnlinkedConstImpl createObject(fb.BufferPointer bp) => new _UnlinkedConstImpl (bp);
1776 }
1777
1778 class _UnlinkedConstImpl extends Object with _UnlinkedConstMixin implements Unli nkedConst {
1779 final fb.BufferPointer _bp;
1780
1781 _UnlinkedConstImpl(this._bp);
1782
1783 List<UnlinkedConstOperation> _operations;
1784 List<int> _ints;
1785 List<double> _doubles;
1786 List<String> _strings;
1787 List<UnlinkedTypeRef> _references;
1788
1789 @override
1790 List<UnlinkedConstOperation> get operations {
1791 _operations ??= const fb.ListReader<UnlinkedConstOperation>(const _UnlinkedC onstOperationReader()).vTableGet(_bp, 0, const <UnlinkedConstOperation>[]);
1792 return _operations;
1793 }
1794
1795 @override
1796 List<int> get ints {
1797 _ints ??= const fb.ListReader<int>(const fb.Int32Reader()).vTableGet(_bp, 1, const <int>[]);
1798 return _ints;
1799 }
1800
1801 @override
1802 List<double> get doubles {
1803 _doubles ??= const fb.Float64ListReader().vTableGet(_bp, 2, const <double>[] );
1804 return _doubles;
1805 }
1806
1807 @override
1808 List<String> get strings {
1809 _strings ??= const fb.ListReader<String>(const fb.StringReader()).vTableGet( _bp, 3, const <String>[]);
1810 return _strings;
1811 }
1812
1813 @override
1814 List<UnlinkedTypeRef> get references {
1815 _references ??= const fb.ListReader<UnlinkedTypeRef>(const _UnlinkedTypeRefR eader()).vTableGet(_bp, 4, const <UnlinkedTypeRef>[]);
1816 return _references;
1817 }
1818 }
1819
1820 abstract class _UnlinkedConstMixin implements UnlinkedConst {
1821 @override
1822 Map<String, Object> toMap() => {
1823 "operations": operations,
1824 "ints": ints,
1825 "doubles": doubles,
1826 "strings": strings,
1827 "references": references,
1828 };
1829 }
1830
1546 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements UnlinkedDocumentationComment { 1831 class UnlinkedDocumentationCommentBuilder extends Object with _UnlinkedDocumenta tionCommentMixin implements UnlinkedDocumentationComment {
1547 bool _finished = false; 1832 bool _finished = false;
1548 1833
1549 String _text; 1834 String _text;
1550 int _offset; 1835 int _offset;
1551 int _length; 1836 int _length;
1552 1837
1553 @override 1838 @override
1554 String get text => _text ?? ''; 1839 String get text => _text ?? '';
1555 1840
(...skipping 3348 matching lines...) Expand 10 before | Expand all | Expand 10 after
4904 }; 5189 };
4905 } 5190 }
4906 5191
4907 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts UnlinkedVariable { 5192 class UnlinkedVariableBuilder extends Object with _UnlinkedVariableMixin impleme nts UnlinkedVariable {
4908 bool _finished = false; 5193 bool _finished = false;
4909 5194
4910 String _name; 5195 String _name;
4911 int _nameOffset; 5196 int _nameOffset;
4912 UnlinkedDocumentationCommentBuilder _documentationComment; 5197 UnlinkedDocumentationCommentBuilder _documentationComment;
4913 UnlinkedTypeRefBuilder _type; 5198 UnlinkedTypeRefBuilder _type;
5199 UnlinkedConstBuilder _constExpr;
4914 bool _isStatic; 5200 bool _isStatic;
4915 bool _isFinal; 5201 bool _isFinal;
4916 bool _isConst; 5202 bool _isConst;
4917 bool _hasImplicitType; 5203 bool _hasImplicitType;
4918 5204
4919 @override 5205 @override
4920 String get name => _name ?? ''; 5206 String get name => _name ?? '';
4921 5207
4922 /** 5208 /**
4923 * Name of the variable. 5209 * Name of the variable.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4956 /** 5242 /**
4957 * Declared type of the variable. Note that when strong mode is enabled, the 5243 * Declared type of the variable. Note that when strong mode is enabled, the
4958 * actual type of the variable may be different due to type inference. 5244 * actual type of the variable may be different due to type inference.
4959 */ 5245 */
4960 void set type(UnlinkedTypeRefBuilder _value) { 5246 void set type(UnlinkedTypeRefBuilder _value) {
4961 assert(!_finished); 5247 assert(!_finished);
4962 _type = _value; 5248 _type = _value;
4963 } 5249 }
4964 5250
4965 @override 5251 @override
5252 UnlinkedConst get constExpr => _constExpr;
5253
5254 /**
5255 * If [isConst] is true, and the variable has an initializer, the constant
5256 * expression in the initializer.
5257 */
5258 void set constExpr(UnlinkedConstBuilder _value) {
5259 assert(!_finished);
5260 _constExpr = _value;
5261 }
5262
5263 @override
4966 bool get isStatic => _isStatic ?? false; 5264 bool get isStatic => _isStatic ?? false;
4967 5265
4968 /** 5266 /**
4969 * Indicates whether the variable is declared using the `static` keyword. 5267 * Indicates whether the variable is declared using the `static` keyword.
4970 * 5268 *
4971 * Note that for top level variables, this flag is false, since they are not 5269 * Note that for top level variables, this flag is false, since they are not
4972 * declared using the `static` keyword (even though they are considered 5270 * declared using the `static` keyword (even though they are considered
4973 * static for semantic purposes). 5271 * static for semantic purposes).
4974 */ 5272 */
4975 void set isStatic(bool _value) { 5273 void set isStatic(bool _value) {
(...skipping 27 matching lines...) Expand all
5003 bool get hasImplicitType => _hasImplicitType ?? false; 5301 bool get hasImplicitType => _hasImplicitType ?? false;
5004 5302
5005 /** 5303 /**
5006 * Indicates whether this variable lacks an explicit type declaration. 5304 * Indicates whether this variable lacks an explicit type declaration.
5007 */ 5305 */
5008 void set hasImplicitType(bool _value) { 5306 void set hasImplicitType(bool _value) {
5009 assert(!_finished); 5307 assert(!_finished);
5010 _hasImplicitType = _value; 5308 _hasImplicitType = _value;
5011 } 5309 }
5012 5310
5013 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom mentBuilder documentationComment, UnlinkedTypeRefBuilder type, bool isStatic, bo ol isFinal, bool isConst, bool hasImplicitType}) 5311 UnlinkedVariableBuilder({String name, int nameOffset, UnlinkedDocumentationCom mentBuilder documentationComment, UnlinkedTypeRefBuilder type, UnlinkedConstBuil der constExpr, bool isStatic, bool isFinal, bool isConst, bool hasImplicitType})
5014 : _name = name, 5312 : _name = name,
5015 _nameOffset = nameOffset, 5313 _nameOffset = nameOffset,
5016 _documentationComment = documentationComment, 5314 _documentationComment = documentationComment,
5017 _type = type, 5315 _type = type,
5316 _constExpr = constExpr,
5018 _isStatic = isStatic, 5317 _isStatic = isStatic,
5019 _isFinal = isFinal, 5318 _isFinal = isFinal,
5020 _isConst = isConst, 5319 _isConst = isConst,
5021 _hasImplicitType = hasImplicitType; 5320 _hasImplicitType = hasImplicitType;
5022 5321
5023 fb.Offset finish(fb.Builder fbBuilder) { 5322 fb.Offset finish(fb.Builder fbBuilder) {
5024 assert(!_finished); 5323 assert(!_finished);
5025 _finished = true; 5324 _finished = true;
5026 fb.Offset offset_name; 5325 fb.Offset offset_name;
5027 fb.Offset offset_documentationComment; 5326 fb.Offset offset_documentationComment;
5028 fb.Offset offset_type; 5327 fb.Offset offset_type;
5328 fb.Offset offset_constExpr;
5029 if (_name != null) { 5329 if (_name != null) {
5030 offset_name = fbBuilder.writeString(_name); 5330 offset_name = fbBuilder.writeString(_name);
5031 } 5331 }
5032 if (_documentationComment != null) { 5332 if (_documentationComment != null) {
5033 offset_documentationComment = _documentationComment.finish(fbBuilder); 5333 offset_documentationComment = _documentationComment.finish(fbBuilder);
5034 } 5334 }
5035 if (_type != null) { 5335 if (_type != null) {
5036 offset_type = _type.finish(fbBuilder); 5336 offset_type = _type.finish(fbBuilder);
5037 } 5337 }
5338 if (_constExpr != null) {
5339 offset_constExpr = _constExpr.finish(fbBuilder);
5340 }
5038 fbBuilder.startTable(); 5341 fbBuilder.startTable();
5039 if (offset_name != null) { 5342 if (offset_name != null) {
5040 fbBuilder.addOffset(0, offset_name); 5343 fbBuilder.addOffset(0, offset_name);
5041 } 5344 }
5042 if (_nameOffset != null && _nameOffset != 0) { 5345 if (_nameOffset != null && _nameOffset != 0) {
5043 fbBuilder.addInt32(1, _nameOffset); 5346 fbBuilder.addInt32(1, _nameOffset);
5044 } 5347 }
5045 if (offset_documentationComment != null) { 5348 if (offset_documentationComment != null) {
5046 fbBuilder.addOffset(2, offset_documentationComment); 5349 fbBuilder.addOffset(2, offset_documentationComment);
5047 } 5350 }
5048 if (offset_type != null) { 5351 if (offset_type != null) {
5049 fbBuilder.addOffset(3, offset_type); 5352 fbBuilder.addOffset(3, offset_type);
5050 } 5353 }
5354 if (offset_constExpr != null) {
5355 fbBuilder.addOffset(4, offset_constExpr);
5356 }
5051 if (_isStatic == true) { 5357 if (_isStatic == true) {
5052 fbBuilder.addBool(4, true); 5358 fbBuilder.addBool(5, true);
5053 } 5359 }
5054 if (_isFinal == true) { 5360 if (_isFinal == true) {
5055 fbBuilder.addBool(5, true); 5361 fbBuilder.addBool(6, true);
5056 } 5362 }
5057 if (_isConst == true) { 5363 if (_isConst == true) {
5058 fbBuilder.addBool(6, true); 5364 fbBuilder.addBool(7, true);
5059 } 5365 }
5060 if (_hasImplicitType == true) { 5366 if (_hasImplicitType == true) {
5061 fbBuilder.addBool(7, true); 5367 fbBuilder.addBool(8, true);
5062 } 5368 }
5063 return fbBuilder.endTable(); 5369 return fbBuilder.endTable();
5064 } 5370 }
5065 } 5371 }
5066 5372
5067 /** 5373 /**
5068 * Unlinked summary information about a top level variable, local variable, or 5374 * Unlinked summary information about a top level variable, local variable, or
5069 * a field. 5375 * a field.
5070 */ 5376 */
5071 abstract class UnlinkedVariable extends base.SummaryClass { 5377 abstract class UnlinkedVariable extends base.SummaryClass {
(...skipping 14 matching lines...) Expand all
5086 */ 5392 */
5087 UnlinkedDocumentationComment get documentationComment; 5393 UnlinkedDocumentationComment get documentationComment;
5088 5394
5089 /** 5395 /**
5090 * Declared type of the variable. Note that when strong mode is enabled, the 5396 * Declared type of the variable. Note that when strong mode is enabled, the
5091 * actual type of the variable may be different due to type inference. 5397 * actual type of the variable may be different due to type inference.
5092 */ 5398 */
5093 UnlinkedTypeRef get type; 5399 UnlinkedTypeRef get type;
5094 5400
5095 /** 5401 /**
5402 * If [isConst] is true, and the variable has an initializer, the constant
5403 * expression in the initializer.
5404 */
5405 UnlinkedConst get constExpr;
5406
5407 /**
5096 * Indicates whether the variable is declared using the `static` keyword. 5408 * Indicates whether the variable is declared using the `static` keyword.
5097 * 5409 *
5098 * Note that for top level variables, this flag is false, since they are not 5410 * Note that for top level variables, this flag is false, since they are not
5099 * declared using the `static` keyword (even though they are considered 5411 * declared using the `static` keyword (even though they are considered
5100 * static for semantic purposes). 5412 * static for semantic purposes).
5101 */ 5413 */
5102 bool get isStatic; 5414 bool get isStatic;
5103 5415
5104 /** 5416 /**
5105 * Indicates whether the variable is declared using the `final` keyword. 5417 * Indicates whether the variable is declared using the `final` keyword.
(...skipping 20 matching lines...) Expand all
5126 5438
5127 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s UnlinkedVariable { 5439 class _UnlinkedVariableImpl extends Object with _UnlinkedVariableMixin implement s UnlinkedVariable {
5128 final fb.BufferPointer _bp; 5440 final fb.BufferPointer _bp;
5129 5441
5130 _UnlinkedVariableImpl(this._bp); 5442 _UnlinkedVariableImpl(this._bp);
5131 5443
5132 String _name; 5444 String _name;
5133 int _nameOffset; 5445 int _nameOffset;
5134 UnlinkedDocumentationComment _documentationComment; 5446 UnlinkedDocumentationComment _documentationComment;
5135 UnlinkedTypeRef _type; 5447 UnlinkedTypeRef _type;
5448 UnlinkedConst _constExpr;
5136 bool _isStatic; 5449 bool _isStatic;
5137 bool _isFinal; 5450 bool _isFinal;
5138 bool _isConst; 5451 bool _isConst;
5139 bool _hasImplicitType; 5452 bool _hasImplicitType;
5140 5453
5141 @override 5454 @override
5142 String get name { 5455 String get name {
5143 _name ??= const fb.StringReader().vTableGet(_bp, 0, ''); 5456 _name ??= const fb.StringReader().vTableGet(_bp, 0, '');
5144 return _name; 5457 return _name;
5145 } 5458 }
(...skipping 10 matching lines...) Expand all
5156 return _documentationComment; 5469 return _documentationComment;
5157 } 5470 }
5158 5471
5159 @override 5472 @override
5160 UnlinkedTypeRef get type { 5473 UnlinkedTypeRef get type {
5161 _type ??= const _UnlinkedTypeRefReader().vTableGet(_bp, 3, null); 5474 _type ??= const _UnlinkedTypeRefReader().vTableGet(_bp, 3, null);
5162 return _type; 5475 return _type;
5163 } 5476 }
5164 5477
5165 @override 5478 @override
5479 UnlinkedConst get constExpr {
5480 _constExpr ??= const _UnlinkedConstReader().vTableGet(_bp, 4, null);
5481 return _constExpr;
5482 }
5483
5484 @override
5166 bool get isStatic { 5485 bool get isStatic {
5167 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 4, false); 5486 _isStatic ??= const fb.BoolReader().vTableGet(_bp, 5, false);
5168 return _isStatic; 5487 return _isStatic;
5169 } 5488 }
5170 5489
5171 @override 5490 @override
5172 bool get isFinal { 5491 bool get isFinal {
5173 _isFinal ??= const fb.BoolReader().vTableGet(_bp, 5, false); 5492 _isFinal ??= const fb.BoolReader().vTableGet(_bp, 6, false);
5174 return _isFinal; 5493 return _isFinal;
5175 } 5494 }
5176 5495
5177 @override 5496 @override
5178 bool get isConst { 5497 bool get isConst {
5179 _isConst ??= const fb.BoolReader().vTableGet(_bp, 6, false); 5498 _isConst ??= const fb.BoolReader().vTableGet(_bp, 7, false);
5180 return _isConst; 5499 return _isConst;
5181 } 5500 }
5182 5501
5183 @override 5502 @override
5184 bool get hasImplicitType { 5503 bool get hasImplicitType {
5185 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 7, false); 5504 _hasImplicitType ??= const fb.BoolReader().vTableGet(_bp, 8, false);
5186 return _hasImplicitType; 5505 return _hasImplicitType;
5187 } 5506 }
5188 } 5507 }
5189 5508
5190 abstract class _UnlinkedVariableMixin implements UnlinkedVariable { 5509 abstract class _UnlinkedVariableMixin implements UnlinkedVariable {
5191 @override 5510 @override
5192 Map<String, Object> toMap() => { 5511 Map<String, Object> toMap() => {
5193 "name": name, 5512 "name": name,
5194 "nameOffset": nameOffset, 5513 "nameOffset": nameOffset,
5195 "documentationComment": documentationComment, 5514 "documentationComment": documentationComment,
5196 "type": type, 5515 "type": type,
5516 "constExpr": constExpr,
5197 "isStatic": isStatic, 5517 "isStatic": isStatic,
5198 "isFinal": isFinal, 5518 "isFinal": isFinal,
5199 "isConst": isConst, 5519 "isConst": isConst,
5200 "hasImplicitType": hasImplicitType, 5520 "hasImplicitType": hasImplicitType,
5201 }; 5521 };
5202 } 5522 }
5203 5523
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/tool/summary/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698